标签:blog logs ted 0.00 int style include value print
#include<stdio.h> #include<string.h> struct STD { int num; char name[20]; char sex[3]; int score; }; int main() { struct STD stu[3]={{10010,"于港岩","男",98},{10002,"于港岩2","女",96},{10003,"于港岩3","男",99}},*p; p=stu; printf("学号\t姓名\t性别\t成绩\n"); for(;p<stu+3;p++) { printf("%d\t%s\t%s\t%d\n",p->num ,p->name ,p->sex ,p->score ); } }
学号 姓名 性别 成绩
10010 于港岩 男 98
10002 于港岩2 女 96
10003 于港岩3 男 99
--------------------------------
Process exited after 0.005182 seconds with return value 0
请按任意键继续. . .
标签:blog logs ted 0.00 int style include value print
原文地址:http://www.cnblogs.com/yugangyan/p/6684063.html