The code is::::: if(condition)
Printf("Hello");
Else
Printf("World");
What will be the condition in if in such a way that both
Hello and world are printed in a single attempt?????? Single
Attempt in the sense... It must first print "Hello" and it
Must go to else part and print "World"..... No loops,
Recursion are allowed........................

Answer Posted / srikanth

int main()
{
if(fork())
{
printf("hello");
}
else
{
printf("world");
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is line in c preprocessor?

605


Compare and contrast compilers from interpreters.

672


What are the loops in c?

588


Explain how do you declare an array that will hold more than 64kb of data?

882


What is self-referential structure in c programming?

646






What is actual argument?

579


can any one tel me wt is the question pattern for NIC exam

1551


Which is best linux os?

550


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

643


develop algorithms to add polynomials (i) in one variable

1727


How to draw the flowchart for structure programs?

8754


Explain the difference between structs and unions in c?

564


Give differences between - new and malloc() , delete and free() ?

601


Function calling procedures? and their differences? Why should one go for Call by Reference?

622


How can you increase the size of a dynamically allocated array?

636