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

What is the output of the program given below

#include<stdio.h>
main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}

Answer Posted / gajanandon

after for there is semicolon...means empty statement. So no
effect of printf.
so for runs till i (char value) increments in positive
direction and terminates once it exceeds 127 (char
limitation).
Hence finally printf will execute and then prints -128.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pointer to pointer in c with example?

1069


What are the different properties of variable number of arguments?

1157


How macro execution is faster than function ?

1184


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

2097


Why do we use & in c?

998


What is queue in c?

1097


can anyone suggest some site name..where i can get some good data structure puzzles???

2082


What is identifiers in c with examples?

1176


What is void main ()?

1075


Differentiate between calloc and malloc.

1261


What is #include stdio h?

1115


What is the best style for code layout in c?

1098


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.

1278


What is the difference between formatted&unformatted i/o functions?

1055


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1907