您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

在C语言中,复合字面量

2024/3/21 0:44:55发布23次查看
in this section we will see what is the compound literals in c. the compound literals are introduced in c99 standard in c. using this feature, it can create unnamed objects. in the following example we will see how to use compound literal to generate object without any name.
example#include<stdio.h>struct point { int x; int y;};void display_point(struct point pt) { printf("(%d,%d)
", pt.x, pt.y);}main() { display_point((struct point) {10, 20});}
输出(10,20)
以上就是在c语言中,复合字面量的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product