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
Which one would you prefer - a macro or a function?
How many types of operators are there in c?
How do I swap bytes?
Why is extern used in c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
What is the code in while loop that returns the output of given code?
How to throw some light on the b tree?
What is variable declaration and definition in c?
Explain continue keyword in c
What is an lvalue?
Why is c used in embedded systems?
How can I insert or delete a line (or record) in the middle of a file?
What are unions in c?
Write a program to reverse a linked list in c.
What is time complexity c?