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
What is a friend function in c++?
What are the benefits of operator overloading?
What does int * mean in c++?
Can you pass a vector to a function?
What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass
Can we use pointers in c++?
What do you mean by stack unwinding in c++?
Do you know what are pure virtual functions?
What is the use of turbo c++?
What is a catch statement?
What are exceptions c++?
What is data binding in c++?
What is object file? How can you access object file?
What is time_t c++?
What new()is different from malloc()?