Only legal pointer operations: →
A. pointer + number pointer →
B. pointer - number number →
C. pointer + pointer pointer →
D. pointer - pointer pointer →
E. pointer - pointer number
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. A, E Only
Explanation
Pointer + integer gives a pointer, and pointer − pointer (same array) gives an integer count. Pointer − integer gives a pointer (not a number), and adding two pointers is illegal.
More Programming Languages and Computer Graphics questions
- Consider the conditional statement if (m == 20 − 10 || n > 10). The order of execution of the following operations is: A. == B. − C. || D. >
- Arrange the 2-D viewing transformation pipeline. A. Convert world-coordinates to viewing coordinates B. Map viewing coordinates to normaliz…
- The major adverse side effects of scan conversion are ;- A. Staircase appearance B. Unequal brightness of slanted lines C. Picket fence pro…
- Match List I (functions) with List II (uses). List I: A. fseek(), B. ftell(), C. feof(), D. rewind(). List II: I. Gives the current positio…
- Which of the following statement is not True?
- Which of the following statements about pointers in C are TRUE. (A) Pointers can be used to access array elements (B) Pointers can store th…