Create a C program to convert byte to integer in base 10 notation
#include <stdio.h> int main() { char b; int i; printf("Enter byte value: "); scanf("%d",&b); i = (int)b; printf("Integer value = %d\n",i); return 0; }
Byte values are ranging from -128 to 127 So, if the input is between -128 to 127 then result int is also same If not with in the range then it prints casting integer value the corresponding to byte.
Get Answers For Free
Most questions answered within 1 hours.