CJCoding With Joseph
15free / daySign inCreate account

March Through Sensors with p++

An int array sensors holds {7, 14, 21, 28, 35} and a pointer p starts at sensors[0]. The while loop runs while p is still inside the array (p < sensors + 5).

Inside the loop, print the value p currently points at on its own line, then move p forward one element with p++.

Expected Output:

7
14
21
28
35

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Pointers
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.