Write a program that can print characters correspond to the least significant byte of an integer variable without using loops | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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
3 Réponses
+ 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
Rohit
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