#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
program to convert a integer to string in c language'
I heard that you have to include stdio.h before calling printf. Why?
What is getch () for?
State the difference between realloc and free.
What is return type in c?
What is getch c?
What is union and structure?
What is a #include preprocessor?
Is null equal to 0 in sql?
Here is a neat trick for checking whether two strings are equal
What is #include stdio h?
Which function in C can be used to append a string to another string?
Explain how can I avoid the abort, retry, fail messages?
What is pass by value in c?
What is the total generic pointer type?