当前位置:网站首页>Classification of plastic surgery: short in long long long

Classification of plastic surgery: short in long long long

2022-07-05 08:33:00 Bright moon and clear wind - continuous improvement

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
	short a = 0xffff;
	int b = 0xffffffff;
	long c = 0xffffffffL;
	long long d = 0xffffffffffffffffLL;

	printf("a = %hx\n", a);
	printf("b = %x\n", b);
	printf("c = %lx\n", c);
	printf("d = %llx\n", d);


	return 0;
}

The operation results are as follows :

 

The size of memory occupied by shaping variables is related to the operating system :

short  2 byte

int 4 byte

long   windows:4 byte   linux32 position 4 byte   linux64 position 8 byte

longlong 8 byte

原网站

版权声明
本文为[Bright moon and clear wind - continuous improvement]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050832070166.html