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........................

Answers were Sorted based on User's Feedback



The code is::::: if(condition) Printf("Hello"); E..

Answer / hari nair

What 'bout this???

If(printf("Hello")
{
printf("Hello");
}
else
printf("World");


//printf returns the no. of arg printed, as no arg printed in if condition, goes straight to the else clause....

Is This Answer Correct ?    0 Yes 5 No

The code is::::: if(condition) Printf("Hello"); E..

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

The code is::::: if(condition) Printf("Hello"); E..

Answer / vaibhav

int a=5,b=5;
if(a==5)
printf("hello");
else;
printf("world");

Is This Answer Correct ?    4 Yes 28 No

The code is::::: if(condition) Printf("Hello"); E..

Answer / manjunath.goudar

//#include<stdio.h>
main()
{
if(1)
printf("hello");
else;
printf("world");
}

Is This Answer Correct ?    7 Yes 33 No

Post New Answer

More C Interview Questions

Why c is faster than c++?

0 Answers  


what is answer for perfect number????????????????

1 Answers  


what is the use of c program?

4 Answers   Synergy, Web Synergies,


What does sizeof return c?

0 Answers  


What is the scope of an external variable in c?

0 Answers  


Which built-in library function can be used to match a patter from the string?

0 Answers  


when user give a number it multiply with 9 without useing '+' and '*' oprator

4 Answers  


4.A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above

6 Answers   Accenture,


What is the difference between getch() and getche()?

1 Answers   NSPL,


Explain null pointer.

0 Answers  


Can a variable be both const and volatile?

0 Answers  


What is the difference between a free-standing and a hosted environment?

0 Answers   Aspire,


Categories