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

How do you determine the length of a string value that was stored in a variable?

652


How can I read and write comma-delimited text?

625


What is nested structure with example?

629


What is clrscr ()?

641


What is boolean in c?

615






What is the difference between text and binary modes?

650


What are the preprocessor categories?

641


All technical questions

1514


Explain that why C is procedural?

662


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

611


What is c programming structure?

623


Differentiate between the = symbol and == symbol?

721


What is scope and lifetime of a variable in c?

582


What are the salient features of c languages?

627


Is there any possibility to create customized header file with c programming language?

630