Need Help ?

Home / Expert Answers / Other / pl-c-write-a-short-c-program-that-declares-and-initializes-to-any-value-you-like-a-double-an-int-and

(Answered): /* pl.c Write a short C program that declares and initializes (to any value you like) a double, an ...



/* pl.c Write a short C program that declares and initializes (to any value you like) a double, an int, and a char. Next decl

/* pl.c Write a short C program that declares and initializes (to any value you like) a double, an int, and a char. Next declare and initialize a pointer to each of the three variables. Your program should then print the address of, and value stored in, and the memory size (in bytes) of each of the six variables. Use the Ox%x" formatting specifier to print addresses in hexadecimal. You should see addresses that look something like this: "Oxbfe55918". The initial characters "Ox" tell you that hexadecimal notation is being used; the remainder of the digits give the address itself. the Use "%f" to print a floating value. Use the sizeof operator to determine memory size allocated for each variable. Sample output: The address of char The address of int The address of double The address of char* The address of int* The address of double* is 0x is Ox is Ox is Ox is Ox is Ox The value of char The value of int The value of double The value of char* The value of int* The value of double* is is is is Ox is Ox is Ox The size of char The size of int The size of double The size of char* The size of int* The size of double* is is is is is is bytes bytes bytes bytes bytes bytes */


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer to /* pl.c Write a short C program that declares and initializes (to any value you like) a double, an int, and a char. Next...
We have an Answer from Expert

Buy This Answer $4

Place Order