首页 > 代码库 > 网易云课堂_艾叔:零基础一站式C语言|C程序设计精讲_章节5整型_课时35整型基础
网易云课堂_艾叔:零基础一站式C语言|C程序设计精讲_章节5整型_课时35整型基础
C的10种数据类型
sizeof(char)=1
sizeof(unsigned char)=1
sizeof(short)=2
sizeof(unsigned short)=2
sizeof(int)=4
sizeof(unsigned int)=4
sizeof(long)=4
sizeof(unsigned long)=4
sizeof(long long)=8
sizeof(unsigned long long)=8
请按任意键继续. . .
#include <stdio.h> #include <stdlib.h> int main() { printf("sizeof(char)=%zd\n", sizeof(char)); printf("sizeof(unsigned char)=%zd\n", sizeof(unsigned char)); printf("sizeof(short)=%zd\n", sizeof(short)); printf("sizeof(unsigned short)=%zd\n", sizeof(unsigned short)); printf("sizeof(int)=%zd\n", sizeof(int)); printf("sizeof(unsigned int)=%zd\n", sizeof(unsigned int)); printf("sizeof(long)=%zd\n", sizeof(long)); printf("sizeof(unsigned long)=%zd\n", sizeof(unsigned long)); printf("sizeof(long long)=%zd\n", sizeof(long long)); printf("sizeof(unsigned long long)=%zd\n", sizeof(unsigned long long)); system("pause"); return 0; }
网易云课堂_艾叔:零基础一站式C语言|C程序设计精讲_章节5整型_课时35整型基础
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。