โ Back to Structs
Question 334
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: 1 2 There is no trailing newline.
Expected Output:
1 2
Topics:
Structs
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.