Chapter - 15: Operations On Bits

What will be the output of the following program:


A
Sections
7
Exercises

A

B

1

2

3

4

5

6

7

#include<stdio.h>
int main()
{
	int i = 32, j = 65, k, l, m, n, o, p;
	k = i | 35; l = ~k; m = i & j;
	n = j ^ 32; o = j << 2; p = i >> 5;
	printf("\nk = %d l = %d m = %d", k, l, m);
	printf("\nn = %d o = %d p = %d", n, o, p);
	return 0;
}

Output:
k = 35 l = -36 m = 0
n = 97 o = 260 p = 1


© 2020 Garbage Valuegarbage value logo