Answer the following questions true (T) or false (F)
1. C++ arrays check for out-of-range index values.
2. A for-loop is a convenient way to step through an array.
1. False
Explanation: C++ array access is directly to memory through addresses, and is designed to be as efficient as possible. The C++ Standard does not require a mechanism to detect out-of-range index values. Finally, no version of C++ this writer is aware of provides this feature.
2. True
You might also like to view...
For the following code, what would be the value of str[2]?
String[] str = {"abc", "def", "ghi", "jkl"}; a. a reference to the String object containing "ghi" b. "ghi" c. a reference to the String object containing "def" d. "def"
From the windows 8 start screen you can choose which apps to run using a ________
A. touch screen B. mouse C. printer D. storage device