Question: Write a single C statement for each of the following . Declare an integer called total, initialize it to 10 Declare a pointer to an

Write a single C statement for each of the following .

Declare an integer called total, initialize it to 10

Declare a pointer to an int called ptr and set it to point to the above variable total

Set the value of the above variable total to 20 using pointer ptr

Print the memory address of total using total and the specifier %p

Print the memory address of total using ptr and the specifier %p

Define a new pointer qtr and let it point to total using ptr

Make qtr point to integer variable result (assume result has been declared)

Double the value of result using qtr

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!