C program to print last three bits of an integer5 months ago

The below C program prints the last three bits of an integer passed as the input.

#include<stdio.h>

int main()
{
    //Program to print the last 3 bits of an integer
    int N;
    scanf("%d",&N);
    printf("%d%d%d",(N&4)/4,(N&2)/2,N&1);
    return 0;
}