Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



The code is::::: if(condition) Printf("Hello"); E..

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

The code is::::: if(condition) Printf("Hello"); E..

Answer / suvam45

#include<stdio.h>
#include<conio.h>
main()
{
static int i;
if(i==0)
{
printf("HELLO");
i=i+1;
main();
}
else
prinf("WORLD");
getch();
}

Is This Answer Correct ?    5 Yes 13 No

The code is::::: if(condition) Printf("Hello"); E..

Answer / vaibhav

int a=5,b=5;
if(a==5)
printf("hello");
else;
printf("world");

Is This Answer Correct ?    4 Yes 28 No

The code is::::: if(condition) Printf("Hello"); E..

Answer / manjunath.goudar

//#include<stdio.h>
main()
{
if(1)
printf("hello");
else;
printf("world");
}

Is This Answer Correct ?    7 Yes 33 No

Post New Answer

More C Interview Questions

Why c is a procedural language?

0 Answers  


What is a buffer in c?

0 Answers  


What are the types of pointers?

0 Answers  


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

1 Answers   Accenture, IBM,


What are the features of the c language?

0 Answers  


write the program for maximum of the following numbers? 122,198,290,71,143,325,98

5 Answers  


What is the method to save data in stack data structure type?

0 Answers  


What is the difference between fork() and vfork()?

2 Answers  


Are the expressions * ptr ++ and ++ * ptr same?

0 Answers  


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

0 Answers  


class foo { public: static int func(const char*& p) const; }; This is illegal, why?

8 Answers   Google,


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.

5 Answers   CCEM, TCS,


Categories