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 |
convert 0.9375 to binary
Why double pointer is used in c?
Is struct oop?
Can include files be nested?
Determine if a number is a power of 2 at O(1).
what is a far pointer
12 Answers ABB, DRDO, ITI, Maruti Suzuki, Steel Plant, TCS, Toyota, Vivo Mobiles,
Can you think of a way when a program crashed before reaching main? If yes how?
Why is it that not all header files are declared in every C program?
is it possible to create your own header files?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
Why is conio.h not required when we save a file as .c and use clrscr() or getch() ?
A program to write a number of letters and numbers, such as counting and display