一个C语言找错题#includemain(){struct{long number;char name[10];char sex[3];int age;}student;struct student x={1001,"张三","男",26};printf("%ld",x.number);}

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 05:34:34

一个C语言找错题#includemain(){struct{long number;char name[10];char sex[3];int age;}student;struct student x={1001,"张三","男",26};printf("%ld",x.number);}
一个C语言找错题
#include
main()
{
struct
{
long number;
char name[10];
char sex[3];
int age;
}student;
struct student x={1001,"张三","男",26};
printf("%ld",x.number);
}

一个C语言找错题#includemain(){struct{long number;char name[10];char sex[3];int age;}student;struct student x={1001,"张三","男",26};printf("%ld",x.number);}
student就是结构体对象了
应该
pritnf(.student.number);