اسئلة واجوبة لسنوات سابقة
  أستــاذ المــادة  هديل قاسم غني
  تـاريـخ النشــر   20/04/2017
Share |


اسئلة امتحان المودل الخاص بالمصفوفات ثنائية البعد ....

Q1/ Examine the following:

double values[][] ={{1.2, 9.0, 3.2},{9.2, 0.5, 1.5, -1.2},{7.3, 7.9,4.8} } ;

What is in   values[3][0] ?

A.      7.3

B.       7.9

C.       9.2

D.      There is no such array element.

 

Correct : D

 

Q2/ Given the following:

int items[][] ={{0, 1, 3, 4},{4, 3, 99, 0, 7 },{3, 2}} ;

Which of the following statements replaces 99 with 77 ?

 

A.  items[2][1] = 77

B.  items[1][2] = 77

C.  items[ 99 ] = 77

D.  items[2][3] = 77;

 

Correct : B

 

Q3/ Which of the following constructs and assigns to array a 2D array with 7 rows, but does not yet construct the column?

A.    int array [7][];

B.    int array [7];

C.    int array [][7];

D.    int array [][];

 

Correct: A

 

Q4/  Examine the following:

Double values={{1.2,9.0,3.2},{9.2,0.5,1.5,-1.2},{7.3,7.9,4.8}};

What is in values[2][1] ?

A.      7.9

B.       7.3

C.       9.2

D.      There is no such array element.

Correct: A