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

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

Answer Posted / anand h i

in printf functiton evaluation of variables start from
right to left so first it evaluates
x>>2
101 after right shift of 2 it will be 001=1
next it will evaluate
x<<2
1 after left shift of 2 it will be 100=4
at the last x=4
so answer is 4 4 1

Is This Answer Correct ?    3 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the collection of communication lines and routers called?

1052


Explain why c is faster than c++?

1001


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1446


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

956


What is variable in c example?

992


What are bitwise shift operators in c programming?

1037


What is floating point constants?

1079


How was c created?

996


Why do we need functions in c?

954


How do you view the path?

1075


Why do we need a structure?

978


What is difference between structure and union in c programming?

1013


What are the salient features of c languages?

1043


Explain how do you list a file’s date and time?

987


Explain how can I manipulate strings of multibyte characters?

1156