please write a program declaring a variable x as


Please write a program declaring a variable x as the type int, and use the scanf function to input an integer to initialize the value of x. Then, your program will print the following values with specified formats using the printf library function:

[01] x (format: decimal)
[02]x (format: hexadecimal)
[03]&x (format: hexadecimal)
[04] (int) (*((int *) x)) (format: decimal)
[05] *((double *) (&x)) (format: double)
[06] ((double *) (&x)) + 1 (format: hexadecimal)
[07] ((int *) (&x)) + 1 (format: hexadecimal)
[08] ((void *) (&x)) + 1 (format: hexadecimal)
[09] ((char *) (&x)) + 1 (format: hexadecimal)
[10] ((char **) (&x)) + 1 (format: hexadecimal)
[11] ((int **) (&x)) + 1 (format: hexadecimal)

Please notice that, if you enter certain values for x, your program might crash due to some logic error of the above specification. Therefore, you need to identify which one (only ONE of the eleven) can cause a problem for your program.

Request for Solution File

Ask an Expert for Answer!!
Application Programming: please write a program declaring a variable x as
Reference No:- TGS0155367

Expected delivery within 24 Hours