What will be the values of k[1] and k[3] after execution of the code segment below using the data shown?

Data: 2 0 1
```
int k[6] = {0, 0, 0, 0, 0, 0};
int i, n;

for (i = 3; i < 6; ++i) {
scanf("%d", &n);
k[n] = i;
}
```

k[1] is 5; k[3] is 0

Computer Science & Information Technology

You might also like to view...

Which of the following common principles of design model methodologies is sometimes referred to as divide and conquer?

A. Cohesion B. Coupling C. Decomposition D. Encapsulation

Computer Science & Information Technology

What file mode is used to open an existing file, and empty the file once opened so that the file is zero bytes in size?

A. Append B. Empty C. Truncate D. Destroy

Computer Science & Information Technology