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
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 |
Answer / vaibhav
int a=5,b=5;
if(a==5)
printf("hello");
else;
printf("world");
| Is This Answer Correct ? | 4 Yes | 28 No |
Answer / manjunath.goudar
//#include<stdio.h>
main()
{
if(1)
printf("hello");
else;
printf("world");
}
| Is This Answer Correct ? | 7 Yes | 33 No |
What is string function in c?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
I have a function which accepts, and is supposed to initialize,a pointer, but the pointer in the caller remains unchanged.
What should malloc(0) do?
State the difference between x3 and x[3].
How many keywords (reserve words) are in c?
Q. where is the below variables stored ? - volatile, static, register
Is main an identifier in c?
Software Interview Questions
what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }
What is data types?
Why main is used in c?