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 / anudyuti
#include <stdio.h>
int executeboth();
void main()
{
both();
}
int both()
{
static int i=0;
if(i++==0 ? executeboth():1)
{
printf ("Hello");
}
else
{
printf (" World");
}
return 0;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the size of enum in bytes?
In C language, a variable name cannot contain?
What is a program?
What is echo in c programming?
When can you use a pointer with a function?
Why are all header files not declared in every c program?
How to get string length of given string in c?
What is identifier in c?
What is the correct code to have following output in c using nested for loop?
write an algorithm to display a square matrix.
What is pointers in c?
What is the use of gets and puts?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
difference between Low, Middle, High Level languages in c ?
Explain how can I make sure that my program is the only one accessing a file?