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 does namespace mean in c++?
Why use of template is better than a base class?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
Write about the members that a derived class can add?
Can constructor be static in c++?
What is the auto keyword good for in c++?
List down the guideline that should be followed while using friend function.
Where Malloc(), Calloc(), and realloc() does get memory?
When should overload new operator on a global basis or a class basis?
Can we make any program in c++ without using any header file and what is the shortest program in c++.
How does list r; differs from list r();?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
an integer constant must have atleast one a) character b) digit c) decimal point
Can malloc be used in c++?