正在加载图片...
3)不能将一个结构体变量直接进行输入输出,只能对结 构体变量的各分量进行输入输出。 如 scanf(“%d%s,%c,%d,%f%s”&st1) 错误 printf("%d, %s, %C, %d, %f, %s", st1) {错误 printf(%s,%d",st1. name, st1. birthday day); IEHA 4)分量和结构体变量的地址均可以被引用 如: scanf(“%d&st1num);输入st1mum的值 printf(%x”,&st1); 以十六进制输出st1的首地址3) 不能将一个结构体变量直接进行输入输出,只能对结 构体变量的各分量进行输入输出。 如: scanf(“%d,%s,%c,%d,%f,%s”,&st1); 错误 printf(“%d,%s,%c,%d,%f,%s”,st1); 错误 printf(“%s,%d”,st1.name,st1.birthday.day); 正确 4) 分量和结构体变量的地址均可以被引用 如: scanf(“%d”,&st1.num); 输入st1.num的值 printf(“%x”,&st1); 以十六进制输出st1的首地址
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有