我是靠谱客的博主 搞怪蓝天,这篇文章主要介绍实验1_5_数据类型,现在分享给大家,希望可以做个参考。

实验1_5_数据类型

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<stdio.h> int main() { char a; short b; int c; long d; long long e; float f; double g; scanf("%c%hd%d%ld%lld%f%lf", &a, &b, &c, &d, &e, &f, &g); printf("The 'char' variable is %c,it takes %d byte.n",a,sizeof(char)); printf("The 'short' variable is %hd,it takes %d bytes.n",b,sizeof(short)); printf("The 'int' variable is %d,it takes %d bytes.n",c,sizeof(int)); printf("The 'long' variable is %ld,it takes %d bytes.n",d,sizeof(long)); printf("The 'long long' variable is %lld,it takes %d bytes.n",e,sizeof(long long)); printf("The 'float' variable is %f,it takes %d bytes.n",f,sizeof(float)); printf("The 'double' variable is %lf,it takes %d bytes.n",g,sizeof(double)); return 0; }

最后

以上就是搞怪蓝天最近收集整理的关于实验1_5_数据类型的全部内容,更多相关实验1_5_数据类型内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(62)

评论列表共有 0 条评论

立即
投稿
返回
顶部