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 / krishna deep sharma

4,4,1
coz we shift the bit as 5=101 now shift two bit to right as
101>>2=001
now
2<<001=100
noe x=4
printf execute from right to left so ans is 4,4,1

Is This Answer Correct ?    11 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is echo in c programming?

1022


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

1031


How can I determine whether a machines byte order is big-endian or little-endian?

1060


What are qualifiers in c?

1033


What are the uses of a pointer?

1151


What is the purpose of void pointer?

1032


Why is it that not all header files are declared in every C program?

1218


Explain setjmp()?

1068


Explain the Difference between the New and Malloc keyword.

1131


What is a good data structure to use for storing lines of text?

1084


What is the size of enum in bytes?

1089


What is use of #include in c?

1166


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1271


Explain the advantages and disadvantages of macros.

1103


What are the 5 data types?

1131