← Back to Structs
Question 404
Struct Assignment Copies Values
Struct Assignment Copies Values
In C, assigning one struct to another copies all of its fields. Copy pointa(which is{1, 2}) into a new pointb, then changeb.xto 99. Because the copy is independent,ais unchanged. Printa's fields (see Expected Output). There is no trailing newline.
Expected Output:
1 2= newline. No newline after the last line.
Hints2 available
Sign in to use hintsTopics:
Structs
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.