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
What does main () mean in c?
Write a program to print fibonacci series without using recursion?
How is a structure member accessed?
Is main an identifier in c?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
Why does this code crash?
What is a shell structure examples?
What is variable initialization and why is it important?
Write a program to show the change in position of a cursor using c
How can a program be made to print the line number where an error occurs?
What type of function is main ()?
Is it better to bitshift a value than to multiply by 2?
State the difference between x3 and x[3].
What is c definition?
What is a pointer variable in c language?