This commit is contained in:
沈瑗杰 2022-04-30 11:33:04 +08:00
parent 7097dd6dcf
commit bf96be1de2
2 changed files with 21 additions and 16 deletions

View File

@ -1,19 +1,5 @@
#include<stdio.h>
#include<stdlib.h>
// DR data types
// 一些用于直观感受类型字节长度的数据类型 #include"utils.h"
// 看着舒服而已(
#define int8 char
#define int16 short
#define int32 int
#define int64 long long
#define uint8 unsigned char
#define uint16 unsigned short
#define uint32 unsigned int
#define uint64 unsigned long long
#define float32 float
#define float64 double
struct part struct part
{ {
@ -25,6 +11,6 @@ struct part
int main(){ int main(){
long double a = 1.0; long double a = 1.0;
// 输出 a 的字节长度 // 输出 a 的字节长度
printf("%o\n", sizeof(long double)); printf("%d\n", sizeof(long double));
} }

19
try/c/utils.h Normal file
View File

@ -0,0 +1,19 @@
// by shenjackyuanjie
// 基本的头文件引用
#include<stdio.h>
#include<stdlib.h>
// 一些用于直观感受类型字节长度的数据类型
// 看着舒服而已(
#define int8 char
#define int16 short
#define int32 int
#define int64 long long
#define uint8 unsigned char
#define uint16 unsigned short
#define uint32 unsigned int
#define uint64 unsigned long long
#define float32 float
#define float64 double