Skip to content

luc102.c

Problem Statement

What will be the output of the provided program segment involving bitwise operators?

Metadata

Property Detail
Author Amit Dutta amitdutta4255@gmail.com
Date 08 Feb 2026
License MIT License (See the LICENSE file for details)

Actions

Raw View on GitHub

💡 You can print or save this file by opening Raw and using your browser.

Source Code

#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;
}