Perform the following operations
(a) 23>>3
(b) 27<<2
(c) 15&9
(d) 15^9
(e) 15|9
Using c language
Answers
Answered by
8
Left Shift and Right Shift Operators in C/C++ - GeeksforGeeks
Answered by
3
Performing the following operations
Explanation:
#include<stdio.h>
int main(){
printf("(a) 23>>3 = %d\n", 23>>3);
printf("(b) 27<<2 = %d\n", 27<<2);
printf("(c) 15&9 = %d\n", 15&9);
printf("(d) 15^9 = %d\n", 15^9);
printf("(e) 15|9 = %d\n", 15|9);
return 0;
}
Answer:
(a) 23>>3 = 2
(b) 27 << 2 = 108
(c) 15&9 = 9
(d) 15^9 = 6
(e) 15|9 = 15
hence, the following operations are performed
Similar questions