Given an array of 100 integers, which of the following loop statements uses pointer arithmetic to process all 100 entries?
A. for (pWalk = ary; pWalk < pWalk + 99; pWalk++) ...
B. for (pWalk = ary; pWalk < pWalk + 100; pWalk++) ...
C. for (pWalk = ary; pWalk < pWalk + 100; pWalk + 1) ...
D. for (pWalk = &ary; pWalk < pWalk + 99; pWalk++) ...
E. for (pWalk = &ary; pWalk < pWalk + 100; pWalk++) ...
Answer: A
You might also like to view...
Alice function_______ takes three arguments—the direction of the movement, the amount of the movement in meters and the amount of time the movement should take in seconds.
a) Movement. b) Move. c) MakeMove. d) None of the above.
In object-oriented analysis, classes are defined by
a. objects and data. b. data and methods. c. operators and objects. d. behaviors and keywords.
Consider the following text: AABABABACBA and pattern: ABBAB By how many positions will the first shift be applied?
a. 3 b. 2 c. 5 d. 1
The System Stability Index displays a number from 1 to 10 each day that relates to the number of errors that occurred up to that day
Indicate whether the statement is true or false