博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C语言:联合变量
阅读量:6908 次
发布时间:2019-06-27

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

 

 

#include 
union hold{ int digit; double big; char letter;}; int main(){ union hold a; a.letter = 'R'; union hold b = a; union hold c = {
88}; union hold d = { .big = 99.9 }; union hold *ps = &a; printf("---%c---",ps->letter); printf("---%c---",a);}

 

转载于:https://www.cnblogs.com/bai-jimmy/p/4470851.html

你可能感兴趣的文章
OCP学习基本知识点总结
查看>>
HDU1009_FatMouse' Trade【贪心】【水题】
查看>>
iOS NSMutableDictionary中UIImage的存储和读取
查看>>
二叉堆
查看>>
使用cssQuery选择器语法来查找元素
查看>>
Linux IPC实践(7) --Posix消息队列
查看>>
使用python创建cocos2d-x项目
查看>>
上网管理 一些主流的视频网站
查看>>
python -- 字符串和编码
查看>>
Java中的Enum的继承
查看>>
[Android]RecyclerView的简单演示样例
查看>>
怎样在Java中运行Hive命令或HiveQL
查看>>
使用enca进行字符集转码
查看>>
Ubuntu下安装Oracle JRE运行环境
查看>>
Go语言标准包之用io包模拟curl
查看>>
Bootstrap输入框组
查看>>
Linux下使用tcpdump进行抓包(转)
查看>>
docker 标记和推送镜像
查看>>
在弱网传输的情况下,是怎么做到节约流量的(面试小问题,Android篇)
查看>>
【转】Spring Boot特性
查看>>