- UNIT-I (Array)
Definition
Macro substitution directives
File inclusion directives
Conditional compilation
Bitwise Operators
Shift operators
Masks
Bitfield
Macro substitution directives
File inclusion directives
Conditional compilation
Bitwise Operators
Shift operators
Masks
Bitfield
Shift operators
Left Shift and Right Shift Operators in C/C++ << (left shift) Takes two numbers, left shifts the bits of the first operand, the second operand decides the number of places to shift. ... >> (right shift) Takes two numbers, right shifts the bits of the first operand, the second operand decides the number of places to shift
Two move administrators move the bits in a whole number variable by a predefined number of positions. The << administrator shifts bits to one side, and the >> administrator shifts bits to one side. The punctuation for these double administrators is
x << n
also,
x >> n
Every administrator moves the bits in x by n positions in the predefined heading. For a correct move, zeros are submitted in the n high-request bits of the variable; for a left move, zeros are put in the n low-request bits of the variable. Here are a couple of models:
कोई टिप्पणी नहीं:
एक टिप्पणी भेजें