#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 program fibonacci series and palindrome program in c
What math functions are available for integers? For floating point?
What is extern storage class in c?
Is there sort function in c?
What does %c do in c?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
What are the benefits of organizational structure?
Write a C program in Fibonacci series.
Is swift based on c?
What is the scope of local variable in c?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
Write a progarm to find the length of string using switch case?
Is array name a pointer?
code for replace tabs with equivalent number of blanks
Combinations of fibanocci prime series