Question: HW #9: Variable Scope and Pointers Due date: Saturday April 1st, 11:59 pm through Handin (https://secure.cse.msu.edu/handin) 1. Write a C statement for each of the

 HW #9: Variable Scope and Pointers Due date: Saturday April 1st,11:59 pm through Handin (https://secure.cse.msu.edu/handin) 1. Write a C statement for each

HW #9: Variable Scope and Pointers Due date: Saturday April 1st, 11:59 pm through Handin (https://secure.cse.msu.edu/handin) 1. Write a C statement for each of the following. (4 pts) a. Declare an integer called tota initialize it to 10 b. Declare a pointer to an int called ptr and set it to point to tota c. Set the value of total to 20 using ptr d. Print the memory address of total using total e. Print the memory address of total using ptr f. Create a new pointer qtr and let it point to total using ptr g. Make qtr point to integer result (assume already result declared) h. Double the value of result using qtr 2. Write a statement to 1.5 pts) a. Assign character 'Z' to the variable pointed to by char pointer answer b. Change the value of variable pointed to by char pointer choice to next character c. Print the value of char pointer answer 3. Consider the following program with only the variable declarations shown. For each statement, specify if it is true or false. (2.5 pts) int x; void alpha(int a) int b; void beta() static int k; void gamma (int x) int main int x, y, z int y, z

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!