日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

PTA ---结构错题汇总

發(fā)布時(shí)間:2023/11/27 生活经验 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 PTA ---结构错题汇总 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1,

struct stu{int x; int *y;
} *p;
int dt[4] = {10, 20, 30, 40};
struct stu a[4] = {50, &dt[0], 60, &dt[1], 70, &dt[2], 80, &dt[3]};int main( )
{ p=a;printf("%d,", ++p->x); //p->x 值為50,之后++50==51printf("%d,", (++p)->x);//(++p)表達(dá)式值為a[1],同時(shí)p向之后移一個(gè)單位。之后a[1]-->x 值為60printf("%d", ++(*p->y));//p->y 值為&dt[1],++20==21return 0;
}輸出:
51,60,21

2,如果結(jié)構(gòu)變量s中的生日是“1984年11月11日”,下列對(duì)其生日的正確賦值是(A

struct student
{  int no;char name[20];char sex;struct{int year;int month;int day;}birth;
};
struct student s;---------------------------
struct add {int year;int month;int day;
};struct student
{  int no;char name[20];struct add birth;char sex;};
struct student s;

A.s.birth.year = 1984; s.birth.month = 11; s.birth.day=11;

B.birth.year = 1984; birth.month = 11; birth.day = 11;

C.s.year = 1984; s.month = 11; s.day = 11;

D.year = 1984; month = 11; day = 11;

總結(jié)

以上是生活随笔為你收集整理的PTA ---结构错题汇总的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。