#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 the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
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]
What is array in c with example?
Where can I get an ansi-compatible lint?
What is a file descriptor in c?
What are reserved words?
What is variables in c?
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?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
How do you view the path?
What is a ternary operator in c?
If errno contains a nonzero number, is there an error?
Here is a good puzzle: how do you write a program which produces its own source code as output?
What is structure pointer in c?
Why do we use int main instead of void main in c?