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 is a class? Explain with an example.

1100


What you know about structures in C++?

1006


How to get the current position of the file pointer?

974


What does return 0 do in c++?

975


What is the first name of c++?

1008


Write a C++ Program to check whether a number is prime number or not?

1058


How do we balance an AVL Tree in C++?

1087


what is scupper?

2319


What c++ is used for?

1011


Which compiler does turbo c++ use?

1022


What is exception handling? Does c++ support exception handling?

972


Define the process of handling in case of destructor failure?

993


What is a list c++?

1070


what you know about c++?

1090


Write a Program to find the largest of 4 no using macros.

1030