← Back to Pointers
Question 449
Print Coordinates With the Arrow Operator
Print Coordinates With the Arrow Operator
main already declares struct Point p = {3, 7}; and struct Point *ptr = &p;. Using ptr (not p), print the two fields, then print the value of the comparison ptr == &p.
The program takes no input. Print exactly the output shown in Expected Output.Expected Output:
x = 3 y = 7 Same object: 1
= 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.