#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 the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

942


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

1959


What is array in c with example?

618


Where can I get an ansi-compatible lint?

643


What is a file descriptor in c?

563






What are reserved words?

657


What is variables in c?

609


Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

2174


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

914


How do you view the path?

671


What is a ternary operator in c?

655


If errno contains a nonzero number, is there an error?

807


Here is a good puzzle: how do you write a program which produces its own source code as output?

600


What is structure pointer in c?

574


Why do we use int main instead of void main in c?

624