比如我定义了一个结构体
struct head
{
char s[10]
int n;
int i[20];
byte k;
byte b[50];
}
for(int x=0;x<5;x++)
{
printf();
//怎么填写
}
比如我定义了一个结构体
struct head
{
char s[10]
int n;
int i[20];
byte k;
byte b[50];
}
for(int x=0;x<5;x++)
{
printf();
//怎么填写
}
创建一个对象h,用h.xxx输出它的属性
#include <stdio.h>
#include <stdlib.h>
struct head
{
char s[10]="asd";
int n=1;
int i[20];
}h;
int main()
{
printf("%s",h.s);
return 0;
}