当前位置:网站首页>整形的分类:short in long longlong
整形的分类:short in long longlong
2022-07-05 08:32:00 【明月清风-精进不止】
#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;
}运行结果如下:

整形变量占用内存的大小与操作系统有关:
short 2字节
int 4字节
long windows:4字节 linux32位 4字节 linux64位 8字节
longlong 8字节
边栏推荐
- 2022.7.4-----leetcode.1200
- 实例010:给人看的时间
- Five design details of linear regulator
- 【三层架构】
- Talk about the circuit use of TVs tube
- Array integration initialization (C language)
- Arduino operation stm32
- 实例006:斐波那契数列
- Explain task scheduling based on Cortex-M3 in detail (Part 1)
- 实例002:“个税计算” 企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.
猜你喜欢

【NOI模拟赛】汁树(树形DP)

Daily question - input a date and output the day of the year

MATLAB skills (28) Fuzzy Comprehensive Evaluation

猜谜语啦(9)

Example 008: 99 multiplication table

STM32 single chip microcomputer -- volatile keyword

【三层架构】

剑指 Offer 09. 用两个栈实现队列

99 multiplication table (C language)

MHA High available Cluster for MySQL
随机推荐
[noi simulation] juice tree (tree DP)
STM32 virtualization environment of QEMU
OC and OD gate circuit
STM32---ADC
Simple design description of MIC circuit of ECM mobile phone
Example 007: copy data from one list to another list.
NTC thermistor application - temperature measurement
Array integration initialization (C language)
Explain task scheduling based on Cortex-M3 in detail (Part 1)
Esp8266 interrupt configuration
猜谜语啦(8)
STM32 lights up the 1.8-inch screen under Arduino IDE
猜谜语啦(5)
Classic application of MOS transistor circuit design (2) - switch circuit design
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
Sword finger offer 09 Implementing queues with two stacks
Lori remote control commissioning record
One question per day - replace spaces
实例005:三数排序 输入三个整数x,y,z,请把这三个数由小到大输出。
Synchronization of QT multithreading