Question: Consider the following program and that a long is 8-bytes, an int is 4-bytes, and a char is 1-byte. #include #define SIZE 24 int main()

Consider the following program and that a long is 8-bytes, an int is 4-bytes, and a char is 1-byte. #include

#define SIZE 24 

int main() { char str[SIZE]; int *i_ptr = (int *)str; long *u_ptr = (long *)(i_ptr + 1);

char *c_ptr = (char *)(u_ptr + 2);

scanf("%x %lx %lx %s", i_ptr, u_ptr, u_ptr + 1, c_ptr);

printf("str = %s ", str);

return 0;

}

Write down the needed input to be sent to scanf so that the call to printf outputs

str = *memory is:JUST bits!<3

Drawing memory as in the previous problem is recommended. The input is:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!