📝 Q8. 运行后输出? ```cpp struct Point{int x,y;}; struct Rectangle{Point toLeft,bottomRight;}; int main(){ Rectangle rect={{10,10},{20,20}}; rect.toLeft.x=5;Point*p=&rect.bottomRight;p->y=5; cout<<rect.toLeft.x+rect.bottomRight.y;} ```
📂 C++
· ⚡ 难度 4
· ❓ 单选题
· 📖 GESP四级真题
Q8. 运行后输出?
```cpp
struct Point{int x,y;};
struct Rectangle{Point toLeft,bottomRight;};
int main(){
Rectangle rect={{10,10},{20,20}};
rect.toLeft.x=5;Point*p=&rect.bottomRight;p->y=5;
cout<<rect.toLeft.x+rect.bottomRight.y;}
```