#include<stdio.h>
int fun();
int i;
int main()
{
while(i)
{
fun();
main();
}
printf("hello \n");
return 0;
}
int fun()
{
printf("hi");
}
answer is hello.how??wat is tat while(i) mean?
Answer Posted / sudhir kumar sharma
if we try this program in case of above program we will come
to a conclusion that all the variable declared before main
are global and assigned a value by default to zero that's
why the while loop will not executed in the above program :)
#include<stdio.h>
#include<conio.h>
int a;
float b;
double c;
char d;
static int e;
int main()
{
clrscr();
printf("%d\n %f\n %d\n %c\n %d\n",a,b,c,d,e);
getch();
return 0;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
How can I dynamically allocate arrays?
What is #define used for in c?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
Function calling procedures? and their differences? Why should one go for Call by Reference?
write a program to generate address labels using structures?
What is the purpose of ftell?
What does p mean in physics?
Can a program have two main functions?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What are different storage class specifiers in c?
What is function prototype in c language?
What is optimization in c?
Which is best linux os?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above