luc102.c ​
Metadata ​
- Author — Amit Dutta
- Last updated — 08 Feb 2026
- License — MIT License (See the LICENSE file for details)
Problem Statement ​
Problem Statement
What will be the output of the provided program segment involving bitwise operators?
Source Code ​
Printing the code
To print this file, open it on GitHub and click Raw before printing, or use the Download Raw button above and print directly from that page.
c
#include <stdio.h>
#include <stdlib.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("k = %d l = %d m = %d\n", k, l, m);
printf("n = %d o = %d p = %d\n", n, o, p);
return 0;
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19