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

What is a lvalue

859


Why array is used in c?

750


What is a program flowchart and explain how does it help in writing a program?

957


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

848


What are the different types of constants?

825


What is new line escape sequence?

1006


what does static variable mean?

832


How was c created?

802


What is the difference between a string and an array?

905


Can we increase size of array in c?

705


Define circular linked list.

777


Why clrscr is used after variable declaration?

1306


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

1984


What are comments and how do you insert it in a C program?

953


What is a protocol in c?

739