0
What is the output of the following C code (structs are copied by value)?
struct Point { int x; int y; };
int main() {
struct Point p1 = {10, 20};
struct Point p2 = p1;
p2.x = 99;
printf("%d %d", p1.x, p2.x);
return 0;
}
- A99 99
- B10 99
- C10 10
- D99 10
Correct answer: B