← Back to Pointers
Question 423
Two Pointers Share One Counter
Two Pointers Share One Counter
counteris set to 10 andpalready points at it. Declare a secondintpointer namedq, copypinto it, then set the value to 25 by writing throughq. 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
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.