March Through Sensors with p++
easyQuestion 433An 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, so print one after the last line.
Hints2 available
Sign in to use hintsTopics
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.