Question: Homework Part1 Write a C program that declares and initializes a double, an int, and a char. You can initialize the variables to any legal

 Homework Part1 Write a C program that declares and initializes a

Homework Part1 Write a C program that declares and initializes a double, an int, and a char. You can initialize the variables to any legal value of your choosing. Next, declare and initialize a pointer variable to each of the variables. Using printf), output the following: The address of each of the first three variables. Use the "Ox%x" format specifier to print the addresses in hexadecimal notation I. 2. The value of each variable. They should equal the value you gave them 3. The memory size in bytes of each variable. Use the C "sizeof()" operator to get this information. Homework Part 2 Add code necessary to print out the address of the variable x in function ptrLab1(), and the variable 'y in ptab2(). What do you notice? Can you explain what you are seeing? #include void ptrLab1 (int xval) int x / Add the code to print the address & value of x here / void ptrLab2 (int dummy) int y; / Add the code to print the address & value of y here * int main(void) ptrLab1(7); ptrlab2(11); return e

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!