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 / akash dhal
initialized with 0
in for loop ist time condition satisfied so print 0,like
this 127 will be printed .as it is a signed no. so 127+1 is
-128 so condition false come out of the loop.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between fread buffer() and fwrite buffer()?
What is the difference between the expression “++a” and “a++”?
Differentiate between ordinary variable and pointer in c.
What is the purpose of sprintf?
What is pointer in c?
develop algorithms to add polynomials (i) in one variable
Explain about the functions strcat() and strcmp()?
What are the main characteristics of c language describe the structure of ac program?
Why do we need volatile in c?
When should a far pointer be used?
Explain how do you print an address?
What are conditional operators in C?
Explain what is the most efficient way to store flag values?
Why isn't any of this standardized in c? Any real program has to do some of these things.
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop