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 / prasanna kumar [cse dept. kln

i think the program will give the output as 0 or null....
because i=0 is in int datatype but in this program it is
declared as character datatype so it will give the output as
0 or null and it will goes for only one time after wards it
will incremented and goes infinitely....

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

904


What are global variables and explain how do you declare them?

805


Why c is called a middle level language?

844


What is integer constants?

831


How many types of operator or there in c?

854


Explain void pointer?

819


Why structure is used in c?

837


What is the use of bitwise operator?

900


How can you increase the size of a statically allocated array?

864


Why are all header files not declared in every c program?

841


How is a structure member accessed?

852


What is the function of multilevel pointer in c?

859


What is a rvalue?

973


What is a MAC Address?

846


writ a program to compare using strcmp VIVA and viva with its output.

1798