1 lab41c for an unsigned char ux0x81 convert it to char x


1. (lab4_1.c) For an unsigned char ux=0x81, convert it to char x, what is xin decimal? write a c program to prove your answer. Your program shouldask user to input ux, and print out x. (Hints: scanf("%x", &ux) to input ahexadecimal number)2. (lab4_2.c) Ask user to input an integer in decimal and output to octaland hexadecimal number3. (lab4_3.c) Write a program to call the function void show_bytes()discussed in class to determine the endianness of your machine.4.1) Read, compile, and run mm.c. (posted on Moodle)2) Split mm.c into lab4_41.c, lab4_42.c and lab4_4.h, where lab4_41.c holdsmain(); lab4_42.c holds printFloat(void), localVariables() andglobleVariables(); lab4_4.h declares these functions. Put comments abovemain() to show how to compile and link into executable file lab4_4.exe.3) Use gdb to debug it. Submit screenshots to prove that you know how toa) Step over/step into your code; b) View values of variables; c) Set breakpoints on each function.4) Use comments in lab4_41.c to explain how c compiler allocates memoryfor local variables and global variables.5. In lab2, you had the following C code. Write equivalent Java programs toachieve the same effect: values changed in methods can get back tomain()./*---------------------------------------------------------------------------------------------------When pointers are used, C will pass by address.The following program is passing by address.*/#include int sum(int*, int*);void main(void){int i = 3, j = 4;int total;total = sum(&i, &j);printf( "i:%d j:%d Total:%dn", i, j, total );}int sum( int *x, int *y){*x = 1;*y = 1;return *x+*y;} 

Request for Solution File

Ask an Expert for Answer!!
Operation Research: 1 lab41c for an unsigned char ux0x81 convert it to char x
Reference No:- TGS01300753

Expected delivery within 24 Hours