strcpy
16lz
2021-04-01
#include <iostream>#include <string.h>struct book { char name[]; int price; char act; } int main { struct book b1={ "C语言程序” , 55, zhangjp}; struct book* pb=&b1; //the result equal in value “pb->name,pb->price etc" printf("书名叫: %s\n",b1.name); printf("价格是: %d\n",b1.price); printf("书的作者是: %s\n",b1.act); b1.price=65; printf("新的价格是:%s\n“,b1.price); strcpy(b1.name,c语言学习笔记); printf("新改的书名为: %s\n", b1.price); return 0; }
更多相关文章
- c语言博客第二节
- 中文自然语言处理相关的开放任务,数据集,以及当前最佳结果
- 就最近看的paper谈谈预训练语言模型发展
- C语言二维数组
- C语言猜数游戏代码
- DolphinDB脚本语言的混合范式编程
- 诺奖夫妇的中国学生, “DID小公主”的成名之作, 茶叶价格与中国
- C语言实现乘法口诀表
- 苹果Mac App Store 的界面语言变成英文了怎么修改为中文?