#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 / who cares

I am not an expert but you can try one thing that I did.

Remove the while loop and put the follow

if (i)
printf ( "hi\n" );


The result is that printf statement never gets any print
out! My guess would be because the value of 'i' is NOT
defined so, that while loop doesn't get assess at all! So,
the result is only "hello"

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure packing in c?

596


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

652


What is the difference between the local variable and global variable in c?

523


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

9648


Explain 'far' and 'near' pointers in c.

693






What is difference between far and near pointers?

597


Write a program to check armstrong number in c?

628


What are the types of operators in c?

604


What do you understand by friend-functions? How are they used?

634


What is bash c?

550


What are the differences between new and malloc in C?

602


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

1779


What are pointers? Why are they used?

625


Why clrscr is used in c?

573


How can I find the modification date of a file?

691