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...

What is the output of following program ?

int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}

Answer Posted / vignesh1988i

4 4 1 is the output....

here the operation of STACK involves.... for these kind of statements (ie) statements having multiple values to get printed it is used..... so the very first element that goes inside stack is x , then x<<2 , then x>>2... so from the TOP it will be operated....
and print as the order given in printf statement..... :)

thank u

Is This Answer Correct ?    6 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does static variable mean in c?

1059


What is the difference between variable declaration and variable definition in c?

1014


How can I direct output to the printer?

1272


How can I automatically locate a programs configuration files in the same directory as the executable?

1103


why do some people write if(0 == x) instead of if(x == 0)?

1011


What are header files and explain what are its uses in c programming?

1064


Why flag is used in c?

1067


What is character constants?

1130


What is a newline escape sequence?

1055


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

1328


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3283


How to declare a variable?

959


What is a global variable in c?

953


What is hungarian notation? Is it worthwhile?

1167


How many types of functions are there in c?

1063