C语言实验一:在屏幕上输出您使用的编译器对如下数据类型所分配的存储字节数:char, unsigned char,short int , int, long int, long long int, 等
实验一:在屏幕上输出您使用的编译器对如下数据类型所分配的存储字节数:char, unsigned char,short int, int, long int, long long int,unsigned short int, unsigned int, unsigned long int, unsigned long long int, float, double, long double。
源程序
#include <stdio.h>
int main(void)
{
printf(“size of char type is %d btyes \n”,sizeof(char));
printf(“size of unsigned char type is %d btyes \n”,sizeof(unsigned char));
printf(“size of short int type is %d btyes \n”,sizeof(short int));
printf(“size of int type is %d btyes \n”,sizeof(int));
printf(“size of long int type is %d btyes \n”,sizeof(long int));
printf(“size of long long int type is %d btyes \n”,sizeof(long long int));
printf(“size of unsigned short int type is %d btyes \n”,sizeof(unsigned short int));
printf(“size of unsigned int type is %d btyes \n”,sizeof(unsigned int));
printf(“size of unsigned long int type is %d btyes \n”,sizeof(unsigned long int));
printf(“size of unsigned long long int type is %d btyes \n”,sizeof(unsigned long long int));
printf(“size of float type is %d btyes \n”,sizeof(float));
printf(“size of double type is %d btyes \n”,sizeof(double)); printf(“size of long double type is %d btyes \n”,sizeof(long double));
return 0;
}
- C 语言包含的数据类型如下图所示: 一、数据类型与“模子” short、int、long、char、float、double 这六个关键字代表C 语言里的六种基本数据类型。 怎么去理解它们呢? 举个
- Linux基本数据类型大小——int,char,long int,long long int(/usr/include/limit.h文件对Linux下数据类型的限制及存储字节大小的说明)
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 数据类型 -- char , unsigned char = BYTE, short, unsigned short = WORD, long, unsigned long = DWORD, int , unginged int = UINT
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- C语言基本数据类型int, short int, long int, long long int, unsigned int, signed int等解析
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数