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
Write a struct time where integer m, h, s are its members?
Is rust better than c++?
How would you call C functions from C++ and vice versa?
Can we define function inside main in c++?
Define a constructor?
What does flush do?
Do vectors start at 0 c++?
What is the use of "new" operator?
What is a class template?
What is == in programming?
Eplain extern keyword?
How is static data member similar to a global variable?
Explain all the C++ concepts using examples.
What are the advantages of c++? Explain
What are c++ templates used for?