初学C语言——结构
#include <stdio.h>
#include <string.h>
struct students{
char name[20];
char sex[4];
int age;
};
int main(int argc,const char * argv[]){
struct students qq;
//struct students qq={"巧巧","人",18};
strcpy(qq.name,"巧巧");
strcpy(qq.sex,"人");
qq.age=18;
printf("name=%s\tsex=%s\tage=%d\t",qq.name,qq.sex,qq.age);
return 0;
}