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 long does this loop run:

for(int x=0; x=3; x++)
a) Never
b) Three times
c) Forever

Answer Posted / pracheer gupta

what r u saying guys..
the loop will run c) forever
this is bcoz in the termination part it is actually x=3 and
not x==3.
x=3 will always evaluate to true and hence the loop is
executed infinite times.

Is This Answer Correct ?    94 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are c++ manipulators?

1122


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

1083


What is pointer to member?

1174


Explain selection sorting. Also write an example.

1095


What c++ is used for?

1153


When should overload new operator on a global basis or a class basis?

1137


Is c++ harder than java?

1129


What is size_type?

1118


Explain the concept of memory leak?

1156


Which format specifier is used for printing a pointer value?

1108


How many standards of c++ are there?

1148


What is stoi in c++?

1235


Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?

1328


Will this c++ program execute or not?

1162


What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack

1127