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 / brainless

b) use pointer of last element - pointer of first element + 1

However, we should know the last element's pointer...

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does #define mean in c++?

1215


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<

2010


What are the rules about using an underscore in a c++ identifier?

1107


Using a smart pointer can we iterate through a container?

1039


How do you differentiate between overloading the prefix and postfix increments?

1050


What are the extraction and insertion operators in c++?

952


why is iostream::eof inside a loop condition considered wrong?

1021


Do class method definitions?

988


Can turbo c++ run c program?

1045


If there are two catch statements, one for base and one for derived, which should come first?

997


Differentiate between C and C++.

1184


Does c++ support exception handling?

1015


What language does google use?

1096


Can a built-in function be recursive?

983


What is Destructor in C++?

1147