CJCoding With Joseph
15free / daySign inCreate account

Two Pointers Share One Counter

counter is set to 10 and p already points at it. Declare a second int pointer named q, copy p into it, then set the value to 25 by writing through q.

Print exactly what is shown in Expected Output.

The first two printf lines are already written for you; you add the third one.

Expected Output:

counter = 25
*p = 25
*q = 25

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

Hints3 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.