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 function definition in c?
What are the types of c language?
Explain the difference between malloc() and calloc() in c?
What are header files and explain what are its uses in c programming?
Explain how do you search data in a data file using random access method?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
Write a program with dynamically allocation of variable.
Can one function call another?
What is scope of variable in c?
What is equivalent to ++i+++j?
What are header files and what are its uses in C programming?
What do you mean by scope of a variable in c?
The statement, int(*x[]) () what does in indicate?
What are the types of macro formats?
What do you mean by a local block?