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


Please Help Members By Posting Answers For Below Questions

What is pointer to pointer in c with example?

540


What does it mean when the linker says that _end is undefined?

621


What is wrong with this initialization?

575


What are nested functions in c?

554


Do array subscripts always start with zero?

766






What are the uses of a pointer?

669


Should I learn data structures in c or python?

567


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

2779


What will the preprocessor do for a program?

576


What is the use of a static variable in c?

578


What does volatile do?

554


What does it mean when a pointer is used in an if statement?

592


Explain high-order bytes.

660


How reliable are floating-point comparisons?

619


How can I list all of the predefined identifiers?

566