Quiz 9 Solution - 20 6) What is the value in the y variable...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Name: _____________________________ Quiz Nine Answer the following questions about the program based on the computer’s memory depicted on the right. [10 points] 1) What value is assigned to the x variable on line 6? 60 2) What value is assigned to the p variable on line 7? 1246210 3) What value is assigned to the y variable on line 8? 60 4) What is the value in the p variable at the end of the program? 1246210 5) What is the value in the x variable at the end of the program?
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 20 6) What is the value in the y variable at the end of the program? 60 7) Which variable in the program is a pointer variable? p 8) What is the name of the & operator used on line 7? address-of 9) What is the name of the * operator used on line 8? indirection or dereference Variable Memory address x 1246210 CIS 209 int main() { int x, y; int *p; x = 60; p = &x; y = *p; *p = 20; return 0; } 1 2 3 4 5 6 7 8 9 10 11 12...
View Full Document

This note was uploaded on 08/29/2011 for the course CIS 209 taught by Professor Aren during the Spring '11 term at Kansas State University.

Ask a homework question - tutors are online