指针引用结构体数组元素-C语言教程

■定义结构体数组和指针:struct student a[100];struct student p; p=a; 通过指针引用结构体数组元素: ①成员引用(p).num=1001;或p->num=1001; (p).score=85;或p->score=85; strcpy((p).name,”wang”);或strcpy(p->name,”wang”);

ppt 文件大小:1.13MB