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 / madhu

127.As i is a char the last digit would be 127,so the loop
stops at that point.
I crosschecked it writing a program.

Is This Answer Correct ?    1 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does not c have an exponentiation operator?

631


p*=(++q)++*--p when p=q=1 while(q<=6)

1271


When do we get logical errors?

642


What is main () in c?

590


Explain data types & how many data types supported by c?

588






Explain how do you view the path?

661


What are called c variables?

576


Explain the advantages and disadvantages of macros.

630


Can you define which header file to include at compile time?

591


why we wont use '&' sing in aceesing the string using scanf

1787


What is the scope of global variable in c?

560


What is difference between stdio h and conio h?

890


What is extern storage class in c?

517


What are near, far and huge pointers?

650


find out largest elemant of diagonalmatrix

1651