Solved

Which of the Following Does Not Declare a 2-By-2 Array

Question 2

Multiple Choice

Which of the following does not declare a 2-by-2 array and set all four of its elements to 0?


A) int b [ 2 ][ 2 ]; b[ 0 ][ 0 ] = b[ 0 ][ 1 ] = b[ 1 ][ 0] = b[ 1 ][ 1 ] = 0;
B) int b[ 2 ][ 2 ] = { 0 };
C) int b[ 2 ][ 2 ]; for int i = 0; i < 2; i++ )
For int j = 0; j < 2; j++ )
B[ i ][ j ] = 0;
D) All of the above initialize all four of the array elements to 0.

Correct Answer:

verifed

Verified

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents