How can you quickly find the number of elements stored in a
a) static array b) dynamic array ?
Answer Posted / murali
for static array start from highest index to lowest (
normal conditions apply*)
if dynamic array is a Container type, size() / length()
will do. if not process the nodes.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How do you define/declare constants in c++?
What is the use of string in c++?
What is a block in c++?
How do you traverse a btree in backward in-order?
Explain the differences between list x; & list x();.
What is difference between class and structure in c++?
Give example of a pure virtual function in c++?
what is scupper?
What are the two types of comments, and how do they differ?
Do class method definitions?
What should main() return in c and c++?
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list
What is friend class in c++ with example?
What do you understand by zombie objects in c++?
What does catch(…) mean?