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

What is a pointer?

1 Answers   ADP, IFFCO,


which of the following go out of the loopo if expn 2 becoming false a.while(expn 1){...if(expn 2)continue;} b.while(!expn 1){if(expn 2)continue;...} c.do{..if(expn 1)continue;..}while(expn 2); d.while(!expn 2){if(expn 1)continue;..}

4 Answers   TCS,


name the language for writing c compiler?

3 Answers   Microsoft,


How can a program be made to print the name of a source file where an error occurs?

0 Answers  


Why cant I open a file by its explicit path?

0 Answers  






What is memcpy() function?

0 Answers  


how to copy a string without using c function

5 Answers  


What are void pointers in c?

0 Answers  


What do you know about the use of bit field?

0 Answers  


What should malloc(0) do?

0 Answers  


what is the defrenece between structure and union

5 Answers   Aloha Technology,


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

5 Answers   TCS, Vimukti Technologies,


Categories