Bitwise operators in c

Bitwise operators-: “c” has a districts of supporting special operation known as bitwise operator for manipulation of data at bit level.These operators are used for testing bit,shifting them right or left. bitwise operators may not be applied to float or double.

these are bitwise operators as like here

&            bitwise AND                                                                                                    |               bitwise OR                                                                                                      ^                     bitwise exclusive OR                                                                             <<                               shift left                                                                                         >>                                     shift right

Special operators -: “C “ support some special operator of interest such as comma operator, size of operator, pointer operators(& and *) and member selection of data.

The comma operator-: the comma operator can be viewed to link the related expression together. A comma linked list of expression are evaluated left to right and the value of right most expression is the value of the combined expression.example 

value = (x=10, y=5, x+y) another example are comma operators

for(i=0,i<10,i++) in loop and another one

The size of operator -: The size of operator decide is a compile-time operator and when used with an operand  IT returns the number of byte the operand occupies.The operator maybe a variable constant or data type qualifier. example

v=sizeof(sum);v=sizeof(long int); v=sizeof(123);

 

Leave a Reply

Your email address will not be published. Required fields are marked *