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...

for(i=1;i>0;i++);
printf("i=%d",i);
what will be the answer????

Answer Posted / vignesh1988i

since after the loop there is a semicolon , so according to
the compiler this semicolon will be taken as next line and
the loop will be iterating till the termination condition....


output possibilities :

1)if the variable 'i' which is used as an signed integer
variable , this will take an infinite values and stop at one
instance and it will terminate the application. but wont
display anything in the screen

2) if this is an unsigned variable this will be infinite
with values going on and on without stopping.. but not
displaying it...


conclusion : loop is infinite here.....



thank u

Is This Answer Correct ?    12 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List some of the dynamic data structures in C?

1249


What is the purpose of type declarations?

1120


What is logical error?

1128


What are the 5 types of inheritance in c ++?

1027


The statement, int(*x[]) () what does in indicate?

1151


What is keyword with example?

1069


What is the use of c language in real life?

1028


What is static volatile in c?

1026


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1282


What is the benefit of using const for declaring constants?

1049


What is spaghetti programming?

1142


List some applications of c programming language?

958


Is it better to bitshift a value than to multiply by 2?

1094


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

2429


What will be your course of action for a push operation?

1112