0

Write a program that can print characters correspond to the least significant byte of an integer variable without using loops

13th May 2021, 5:16 AM
Sanket Athawale
Sanket Athawale - avatar
4 Respostas
+ 1
Show your attempt first
13th May 2021, 5:20 AM
Atul [Inactive]
+ 1
replace %c with %d the rest looks fine
13th May 2021, 5:27 AM
minirkk
minirkk - avatar
0
#include <stdio.h> #include <stdlib.h> int main() { int num; printf("Enter the number : "); scanf("%d",&num); printf("The character corresponding to the least significant bit of the number : %c",(num & 1)); return 0; }
13th May 2021, 5:23 AM
Sanket Athawale
Sanket Athawale - avatar