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 a=5;
printf(?%d,%d,%d\n?,a,a< <2,a>>2);
}
Answer: 5,20,1 please explain this code in detail

Answer Posted / sathish

go through right shift & left shift operator function.

Ex: a<<2 = 5<<2 = 00000101(in binary)<<2 = 00010100(in
binary) = 20(in decimal)

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Once I have used freopen, how can I get the original stdout (or stdin) back?

1120


how can I convert a string to a number?

1137


Explain how can a program be made to print the line number where an error occurs?

1282


How can I make sure that my program is the only one accessing a file?

1347


Here is a good puzzle: how do you write a program which produces its own source code as output?

1170


Why is c so popular?

1210


What are dangling pointers in c?

1351


How many types of sorting are there in c?

1111


Explain bitwise shift operators?

1316


Define Spanning-Tree Protocol (STP)

1178


Where can I get an ansi-compatible lint?

1202


What is the general form of a C program?

1068


Explain how can I convert a string to a number?

1148


Give the rules for variable declaration?

1218


Explain 'bit masking'?

1135