c语言柔性数组
发布日期:2021-06-30 18:54:09 浏览次数:3 分类:技术文章

本文共 294 字,大约阅读时间需要 1 分钟。

#include "stdio.h"

 
struct st_type{    int i;	int a[];};void main(void){	struct st_type *st_p =(struct st_type *)malloc(sizeof(struct st_type)+100*sizeof(int));	st_p->i=10;	memcpy(st_p->a,"i love you!!!!!!",20);	printf("%d %s\r\n",st_p->i,st_p->a);}
10 i love you!!!!!!
Press any key to continue

转载地址:https://linus.blog.csdn.net/article/details/54949245 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:nordic 协议栈区别
下一篇:C语言变量和函数命名规范

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2024年04月22日 13时31分33秒