该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
Compilation finished with warnings:
source.c:4:86: warning: suggest braces around initialization of subobject [-Wmissing-braces]
struct teacher{int num;char name[20];char sex;float score[3]; }tec={1472,"Li Yi",'F',60,80,100};
^~~~~~~~~
{ }
source.c:5:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main(){void print(struct teacher *);print(&tec);system("pause");}
^~~~
source.c:6:60: warning: format specifies type 'char *' but the argument has type 'char' [-Wformat]
void print(struct teacher *p){printf(FORMAT,p->num,p->name,p->sex,p->score[0],p->score[1],p->score[2]);printf("\n"); }
^~~~~~
source.c:6:119: warning: no newline at end of file [-Wnewline-eof]
void print(struct teacher *p){printf(FORMAT,p->num,p->name,p->sex,p->score[0],p->score[1],p->score[2]);printf("\n"); }
^
4 warnings generated.