#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
What is substring in c?
Give the rules for variable declaration?
How do you convert strings to numbers in C?
What is I ++ in c programming?
Can we compile a program without main() function?
Explain the difference between malloc() and calloc() function?
What are the types of bitwise operator?
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.
Write the test cases for checking a variable having value in range -10.0 to +10.0?
Do you have any idea how to compare array with pointer in c?
How to set file pointer to beginning c?
How can I read data from data files with particular formats?
Can an array be an Ivalue?
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.
How many keywords (reserve words) are in c?