#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 / tatukula

in above program variable 'i' is declared as global integer ..so i=0...thats why while() condition gets failed and
prints 'hello'

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

given post order,in order construct the corresponding binary tree

2532


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1681


What is || operator and how does it function in a program?

839


What are the two types of structure?

798


What is #define in c?

814


Why can't I perform arithmetic on a void* pointer?

823


Describe the order of precedence with regards to operators in C.

835


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

981


Is c still relevant?

842


What are enums in c?

842


What does sizeof function do?

863


What are the types of i/o functions?

963


what is ur strangth & weekness

2034


What is static and volatile in c?

979


What is the size of enum in bytes?

791