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 the g value paradox?

1123


Why is C language being considered a middle level language?

1077


Is void a keyword in c?

936


What is hashing in c?

1114


write a programming in c to find the sum of all elements in an array through function.

2138


What is the use of getch ()?

1050


When should volatile modifier be used?

971


What is || operator and how does it function in a program?

1059


What is the basic structure of c?

1029


What is the difference between strcpy() and memcpy() function in c programming?

1045


Explain what will the preprocessor do for a program?

1024


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1486


Are c and c++ the same?

1020


What is pragma in c?

1150


What is the use of define in c?

1023