If N is 4 and m is the matrix displayed below, which code fragment below stores 1's along m's main diagonal and leaves all other entries unchanged?

```
m 0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
```

a. for ( int i = 1; i < N; ++i )
for ( int j = i; j <= N; ++j )
m[i][j] = 1;

b. for ( int i = 1; i < N; ++i )
m[i][i] = 1;
c. for ( int i = 0; i < N; ++i )
for ( int j = i; j <= N; ++j )
m[i][j] = 1;

d. for ( int i = 0; i < N; ++i )
m[i][i] = 1;


d. for ( int i = 0; i < N; ++i )
m[i][i] = 1;

Computer Science & Information Technology

You might also like to view...

When you want to adjust the exposure of a photo in Windows Photo Gallery, you should use which of the following?

A) FPS B) Compression C) Saturation D) Auto Adjust

Computer Science & Information Technology

? In the figure above, which lines of code set the style for the header?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

AC Case 5-1Ms. West is a fourth grade teacher in a self-contained classroom. She keeps track of her students' attendence, homework, projects, and scores in an Access database. At the end of the year, she wants to provide each parent or guardian with a printed report containing this information. Which of the following is NOT an example of a control that Ms. West could add to a report using a button in the Controls group?

A. Page Number B. Text Box C. Hyperlink D. Chart

Computer Science & Information Technology

Briefly explain how WEP implementation violates the cardinal rule of cryptography: anything that creates a detectable pattern must be avoided.

What will be an ideal response?

Computer Science & Information Technology