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 read and write comma-delimited text?

1028


What is sizeof array in c?

1001


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1031


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

2164


What is the use of #define preprocessor in c?

1039


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

975


Explain the advantages and disadvantages of macros.

1046


what is different between auto and local static? why should we use local static?

1091


Where are some collections of useful code fragments and examples?

1120


Not all reserved words are written in lowercase. TRUE or FALSE?

1198


Explain what is the heap?

1025


What is scope and lifetime of a variable in c?

1008


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

2365


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2828


What is the purpose of the statement: strcat (S2, S1)?

1127