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 / suvam45

#include<stdio.h>
#include<conio.h>
main()
{
static int i;
if(i==0)
{
printf("HELLO");
i=i+1;
main();
}
else
prinf("WORLD");
getch();
}

Is This Answer Correct ?    5 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is wrong with this program statement? Void = 10;

761


Write a program to print factorial of given number using recursion?

601


What is openmp in c?

611


What are unions in c?

575


Explain enumerated types.

597






What is function pointer c?

584


Explain what header files do I need in order to define the standard library functions I use?

645


What is the difference between class and object in c?

581


Write a c program to demonstrate character and string constants?

1679


What is a dynamic array in c?

589


Define recursion in c.

699


What is FIFO?

669


Why can arithmetic operations not be performed on void pointers?

587


Explain the binary height balanced tree?

721


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1618