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 |
Why c is a procedural language?
What is a buffer in c?
What are the types of pointers?
When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these
What are the features of the c language?
write the program for maximum of the following numbers? 122,198,290,71,143,325,98
What is the method to save data in stack data structure type?
What is the difference between fork() and vfork()?
Are the expressions * ptr ++ and ++ * ptr same?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
class foo { public: static int func(const char*& p) const; }; This is illegal, why?
What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement.