美文网首页
初学C语言

初学C语言

作者: RedMushrooms | 来源:发表于2018-01-28 17:07 被阅读0次

初学C语言——联合和枚举

#include    <stdio.h>

#include    <string.h>

union qubie{

int score;

int salary;

};

struct person{

int number;

char name[20];

int age;

union qubie qb;

};

int main(int argc,const char * argv[]){

struct person student;

student.qb.score=99;

struct person teacher;

teacher.qb.salary=9999;

printf("ѧÉú·ÖÊý=%d\tÀÏʦнˮ=%d\t",student.qb.score,teacher.qb.salary=9999);

return 0;

}

相关文章

  • 初学C语言

    1。error C2059: syntax error : 'bad suffix on number' 如果出现...

  • 初学C语言

    初学C语言——for循环语句的嵌套 #includeint main(int argc,const char * ...

  • 初学C语言

    初学C语言——利用for求平均分 #includeint main(int argc,const char * a...

  • 初学C语言

    初学C语言——for循环语句 #includeint main(int argc,const char * arg...

  • 初学C语言

    初学C语言——if else语句 #includeint main(int argc,const char * a...

  • 初学C语言

    初学C语言——while循环求平均分 #includeint main(int argc,const char *...

  • 初学C语言

    初学C语言——if语句 #includeint main(int argc,const char * argv[]...

  • 初学C语言

    初学C语言——while循环 #includeint main(int argc,const char * arg...

  • 初学C语言

    初学C语言——if-else if-else语句 #includeint main(int argc,const ...

  • 初学C语言

    初学C语言——while循环求和3003 #includeint main(int argc,const char...

网友评论

      本文标题:初学C语言

      本文链接:https://www.haomeiwen.com/subject/uaqzaxtx.html