Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do you define/declare constants in c++?

1003


What is the use of string in c++?

977


What is a block in c++?

981


How do you traverse a btree in backward in-order?

978


Explain the differences between list x; & list x();.

958


What is difference between class and structure in c++?

1132


Give example of a pure virtual function in c++?

1084


what is scupper?

2319


What are the two types of comments, and how do they differ?

1049


Do class method definitions?

984


What should main() return in c and c++?

968


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

950


What is friend class in c++ with example?

945


What do you understand by zombie objects in c++?

1039


What does catch(…) mean?

1065