This commit is contained in:
2026-02-23 20:46:42 +08:00
commit c5f2ebb5d6
15 changed files with 484 additions and 0 deletions

20
sizeof函数.cpp Normal file
View File

@@ -0,0 +1,20 @@
//
// Created by viole on 2026/2/20.
//
#include "iostream"
#include "windows.h"
using namespace std;
int main() {
SetConsoleOutputCP(CP_UTF8);
short age = 21;
int num1 = 21;
long num2 = 32;
long long num3 = 42;
cout<<"short的大小是"<<sizeof(age)<<endl;
cout<<"int"<<sizeof(num1)<<endl;
cout<<"long的大小是"<<sizeof(num2)<<endl;
cout<<"long long的大小是"<<sizeof(num3)<<endl;
cout<<sizeof(2178787)<<endl;
cout<<sizeof("nkljkjkj")<<endl;
u_int num4 = 42;
}