7.x=10;
y=20;
x<<2=?
x<<1=?
y>>2=?



7.x=10; y=20; x<<2=? x<<1=? y>>2=? ..

Answer / veerendra kumar

here << means shiftleft operation,>> means shiftright
operations x<<2 means 10<<2--->00001010<<2 take 8 binary
format.shiftleft means moving two places from leftmost to
rightmost i.e 00101000(40 will come),same like that x<<1
means 10<<1--->00001010<<1 after moving 00010100 answear
is:20,y>>2--->00010100>>2 after shiftright operation
00000101 answear is:5

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

code for connection from windows forms to sql server

0 Answers   ME,


What are the limitation in using querystring in .net?

1 Answers   Tesco,


There is a room with 1000 light switches, numbered 1, 2, 3, 4, ... 1000, all turned off. Outside the room there are 1000 men, numbered man1, man2, ...man 1000 In order, each man walks into the room and changes the position of each switch that is a multiple of his number. That is: man1 flips every switch man2 flips switches 2, 4, 6, 8 ....1000 man3 flips switches 3, 6, 9, ..... 999 ..... Man 1000 flips switch 1000 After all 1000 men are done, how many switches are on?

3 Answers  


Write a pascal program to calculate the sum of the first 100 even number and odd number

0 Answers  


give idea for creating screen in abap

0 Answers  






What is the first message line that any language learning prints on the screen? and why?

0 Answers  


which of the following is efficient in terms of space a. insertion sort b. quick sort c. selection d. both a and c

1 Answers   Hughes,


what is the system development cycle

0 Answers  


What do you mean by an array ? explain with an example

7 Answers  


which worker is involved in all the phases of SDLC?

1 Answers  


When we have more than one main function in a program how does the compiler know the starting point of the program, i mean from which main the execution or compilation of the program begins?

2 Answers   247Customer,


can any method return type may be constructor , or that method name allow

0 Answers   HCL,


Categories