|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include<stdio.h>
struct Book
{
char title[128];
char author[40];
float price;
unsigned int data;
char publisher[40];
}book={
book.price=48.8,
book.data=20171111,
book.publisher="清华大学出版社"
};
int main()
{
struct Book book;
printf("%d\n",book.data);
printf("%s\n",book.publisher);
}
- #include<stdio.h>
- struct Book
- {
- char title[128];
- char author[40];
- float price;
- unsigned int data;
- char publisher[40];
- }book={
- .price=48.8,
- .data=20171111,
- .publisher="清华大学出版社"
- };
- int main()
- {
- struct Book book;
- printf("%d\n",book.data);
- printf("%s\n",book.publisher);
- }
复制代码
|
|