Tell me what are bitwise shift operators?
Submitted by: Administrator<< - Bitwise Left-Shift
Bitwise Left-Shift is useful when to want to MULTIPLY an integer (not floating point numbers) by a power of 2.
Expression: a << b
This expression returns the value of a multiplied by 2 to the power of b.
>> - Bitwise Right-Shift
Bitwise Right-Shift does the opposite, and takes away bits on the right.
Expression: a >> b
This expression returns the value of a divided by 2 to the power of b.
Submitted by: Administrator
Bitwise Left-Shift is useful when to want to MULTIPLY an integer (not floating point numbers) by a power of 2.
Expression: a << b
This expression returns the value of a multiplied by 2 to the power of b.
>> - Bitwise Right-Shift
Bitwise Right-Shift does the opposite, and takes away bits on the right.
Expression: a >> b
This expression returns the value of a divided by 2 to the power of b.
Submitted by: Administrator
Read Online C Pointers Job Interview Questions And Answers
Top C Pointers Questions
☺ | What would be the equivalent pointer expression for referring the array element a[i][j][k][l] |
☺ | Tell me with an example the self-referential structure? |
☺ | Explain what is the purpose of "extern" keyword in a function declaration? |
☺ | What is the difference between exit() and _exit() function? |
☺ | Do you know the use of fflush() function? |
Top C Programming Categories
☺ | C Functions Interview Questions. |
☺ | C Pointers Interview Questions. |
☺ | C Preprocessor Interview Questions. |