#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 substring in c?

856


Give the rules for variable declaration?

920


How do you convert strings to numbers in C?

921


What is I ++ in c programming?

855


Can we compile a program without main() function?

871


Explain the difference between malloc() and calloc() function?

799


What are the types of bitwise operator?

837


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2533


Write the test cases for checking a variable having value in range -10.0 to +10.0?

2062


Do you have any idea how to compare array with pointer in c?

818


How to set file pointer to beginning c?

902


How can I read data from data files with particular formats?

812


Can an array be an Ivalue?

866


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

2056


How many keywords (reserve words) are in c?

796