What is the output of the program given below

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

Answers were Sorted based on User's Feedback



What is the output of the program given below #include<stdio.h> main() { ..

Answer / vennila

*
**
***
****

Is This Answer Correct ?    0 Yes 0 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / gautam

0 to 127

Is This Answer Correct ?    5 Yes 6 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / mohmedali

0

Is This Answer Correct ?    4 Yes 6 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / rajendra.p (honeywell)

-128 is correct answer

Is This Answer Correct ?    2 Yes 4 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / sakthi

the function should not return any value.
or
-113

Is This Answer Correct ?    1 Yes 3 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / tasneemuddin

It will print no from 0 to 32767.
Like :
0
1
2
3
.
.
.
.
32767

Is This Answer Correct ?    3 Yes 6 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / mohmedali

garbage values

Is This Answer Correct ?    1 Yes 7 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / deepanjali

infinte loop

Is This Answer Correct ?    4 Yes 10 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / mohmedali

1

Is This Answer Correct ?    1 Yes 8 No

What is the output of the program given below #include<stdio.h> main() { ..

Answer / ananth

The loop never gets terminated as it runs infinite. So the
printf statement will not trigger & no o/p is produced.

Is This Answer Correct ?    11 Yes 19 No

Post New Answer

More C Interview Questions

helllo sir , what is the main use of the pointer ,array ,and the structure with the example of a programe

2 Answers  


Explain c preprocessor?

0 Answers  


how to create duplicate link list using C???

0 Answers  


Why is not a pointer null after calling free?

0 Answers  


how does the C compiler interpret the following two statements p=p+x; q=q+y; a. p=p+x; q=q+y b. p=p+xq=q+y c. p=p+xq; q=q+y d. p=p+x/q=q+y

2 Answers   TCS, Tech Synergy,






what is the first address that gets stored in stack according to a C or C++ compiler???? or what will be the first address that gets stored when we write a C source code????????

2 Answers   Apple,


char ch=10;printf("%d",ch);what is the output

14 Answers   Accenture,


How to find the digits truncation when assigning the interger variable to the character variables. like int i=500; char x = i : here we have truncation. how to find this. another ex: i =100; char x=i. here we do not have truncation.

1 Answers   HCL,


What are the scope of static variables?

0 Answers  


What do you mean by c what are the main characteristics of c language?

0 Answers  


Name the language in which the compiler of "c" in written?

3 Answers   Bajaj,


What is the use of keyword VOLATILE in C?

1 Answers  


Categories