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 program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

574


What is the use of printf() and scanf() functions?

628


Is c is a low level language?

559


What is the sizeof () operator?

618


What is an auto keyword in c?

636






Explain the difference between malloc() and calloc() function?

596


What is pointer to pointer in c?

632


Explain what is #line used for?

603


What does %c mean in c?

643


What is the purpose of sprintf?

615


What is the use of typedef in structure in c?

538


How can you read a directory in a C program?

647


What is a double c?

585


what is the function of pragma directive in c?

618


What is atoi and atof in c?

612