Which operation will write val to the item at position i in anArray?

A. anArray[i] = val;
B. anArray[i] = val;
C. anArray.val[i];
D. val = anArray[i];

Answer: B

Computer Science & Information Technology

You might also like to view...

Suppose we are given an STL vector container named vec that holds values of type double. What do each of vec[vec.size()-1], vec.back(), *(vec.end()-1), *(vec.begin()+vec.size()-1)and *vec.rbegin() mean?

What will be an ideal response?

Computer Science & Information Technology

In a While loop, the loop variable can be initialized at any place in the program before the condition.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology