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

How do you do dynamic memory allocation in C applications?

1089


Explain the difference between exit() and _exit() function?

1172


Why we use stdio h in c?

1036


What is the difference between the = symbol and == symbol?

1118


Write a c program to demonstrate character and string constants?

2192


What is indirection? How many levels of pointers can you have?

1136


How do you search data in a data file using random access method?

1304


How to get string length of given string in c?

1067


What are the different types of data structures in c?

1166


What is adt in c programming?

1165


What’s the special use of UNIONS?

1152


What are 'near' and 'far' pointers?

1042


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1132


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

1245


What Is The Difference Between Null And Void Pointer?

1256