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

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

Think is there any Other.....

Is This Answer Correct ?    62 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are multidimensional arrays?

901


Why do we use main function?

932


What is header file in c?

872


Which is better between malloc and calloc?

928


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

3691


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

1043


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

5201


Is it possible to initialize a variable at the time it was declared?

1035


What are static variables in c?

851


What do you mean by scope of a variable in c?

801


What is struct node in c?

848


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1754


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2985


What are predefined functions in c?

818


What is the advantage of using #define to declare a constant?

883