C语言结构定义

#include <stdio.h>

int main(void)
{
	typedef struct book{
	   char	name[5];
	   int year;
	}bookstore;
	bookstore book1={.name="ssss",.year=2018};
	
   printf("%d\n",book1.year);
   printf("%s\n",book1.name);
   return 0;
}

猜你喜欢

转载自blog.csdn.net/u013273161/article/details/83786666
今日推荐