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

How can I get back to the interactive keyboard if stdin is redirected?

1242


Tell me what is null pointer in c?

1133


Why is extern used in c?

1149


main() { printf("hello"); fork(); }

1252


Are comments included during the compilation stage and placed in the EXE file as well?

1130


What is a far pointer in c?

1103


How many types of operators are there in c?

1089


Is linux written in c?

1085


Sir i need notes for structure,functions,pointers in c language can you help me please

2463


Distinguish between actual and formal arguments.

1136


What is the difference between functions getch() and getche()?

1141


Is there any demerits of using pointer?

1124


Write a code to generate divisors of an integer?

1107


Explain zero based addressing.

1099


What are the 32 keywords in c?

1141