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
Are comments included during the compilation stage and placed in the EXE file as well?
What are enumerated types?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What is the default value of local and global variables in c?
What is sizeof int?
Is c high or low level?
What's the best way of making my program efficient?
What is else if ladder?
What is dynamic variable in c?
Is there sort function in c?
Why isn't any of this standardized in c? Any real program has to do some of these things.
What is a string?
What does. int *x[](); means ?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
What is putchar() function?