Quiz 7 and Solutions

Quiz 7 and solutions

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Computer Techniques for Electronic Design II (ESE 224) Quiz for chapter 7 Period: 10 minutes Memory Snapshots Problem 1. Suppose x[m][n] is a two dimension array. m and n may vary. And its memory allocation is like figure 1. Which of the following element may correspond Memory to the shadowed region for different m and n? snapshots (m could be 1,2,3,4,5,…; n could be 1, 2, 3, 4, 5,…) a) x[2][0]; x b) x[1][1]; c) x[4][0]; d) x[0][4]; e) x[1][3]; 2. Which of following codes of initializing /assigning a two dimension array int x[2][2] is correct? a) x[2][2] = {{2, 1}, {1, 2}}; b) for(int i =0; i < 2; i++) for(int j = 0; j < 2; j++) x[i][j] = j; c) x[2][2] = {2,1,1,2...
View Full Document

Ask a homework question - tutors are online