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

write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

14939


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

760


Explain what are the different file extensions involved when programming in c?

625


What is the symbol indicated the c-preprocessor?

686


What are terms in math?

575






What is a spanning Tree?

935


Once I have used freopen, how can I get the original stdout (or stdin) back?

615


Why is c called c not d or e?

600


What are global variables and how do you declare them?

608


Why cant I open a file by its explicit path?

586


Explain what is wrong with this program statement? Void = 10;

754


Implement bit Array in C.

666


What is the difference between if else and switchstatement

1304


What is indirection? How many levels of pointers can you have?

650


Which is the memory area not included in C program? give the reason

1491