CJCoding With Joseph

Struct Assignment Copies Values

In C, assigning one struct to another copies all of its fields. Copy point a (which is {1, 2}) into a new point b, then change b.x to 99. Because the copy is independent, a is unchanged. Print a'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.