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
number of times a digit is present in a number
What are the uses of a pointer?
What are volatile variables in c?
What is s or c?
what do the 'c' and 'v' in argc and argv stand for?
What is hash table in c?
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
When should the register modifier be used? Does it really help?
Differentiate between ordinary variable and pointer in c.
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What is a pragma?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
Explain which function in c can be used to append a string to another string?
What are the different types of errors?
Do you know the use of 'auto' keyword?