我是靠谱客的博主 沉静信封,这篇文章主要介绍牛客网-编程初学者入门训练-有容乃大,现在分享给大家,希望可以做个参考。

题目描述
确定不同整型数据类型在内存中占多大(字节),输出不同整型数据类型在内存中占多大(字节)。
输入描述:

输出描述:
不同整型数据类型在内存中占多大(字节),具体格式详见输出样例,输出样例中的?为不同整型数据类型在内存中占的字节数。输出样例如下:

The size of short is ? bytes.
The size of int is ? bytes.
The size of long is ? bytes.
The size of long long is ? bytes.

#include<stdio.h>
#include<stdlib.h>
int main()
{
    printf("The size of short is %d bytes.n",sizeof(short));
    printf("The size of int is %d bytes.n",sizeof(int));
    printf("The size of long is %d bytes.n",sizeof(long));
    printf("The size of long long is %d bytes.n",sizeof(long long));
    return 0;
}

最后

以上就是沉静信封最近收集整理的关于牛客网-编程初学者入门训练-有容乃大的全部内容,更多相关牛客网-编程初学者入门训练-有容乃大内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部