当前位置:网站首页>First knowledge of C language -- common data types
First knowledge of C language -- common data types
2022-07-27 05:37:00 【yin_ Yin】
C What are the common data types in the language ?
char // Character data type
short // Short
int // plastic
long // Long integer
long long // Longer plastic surgery
float // Single-precision floating-point
double // Double precision floating point
1. Why are there so many types ?
There are so many types , In fact, it is to express various values in life more abundantly . Different data can be represented by different types .
2. What is the size of each type ?
have access to sizeof Operator to calculate the space occupied by different data types
#include <stdio.h>
int main()
{
printf("%d\n", sizeof(char));
printf("%d\n", sizeof(short));
printf("%d\n", sizeof(int));
printf("%d\n", sizeof(long));
printf("%d\n", sizeof(long long));
printf("%d\n", sizeof(float));
printf("%d\n", sizeof(double));
printf("%d\n", sizeof(long double));
return 0; }

3. Use of type

边栏推荐
- flask项目配置
- Day3 ---Flask 状态保持,异常处理与请求钩子
- GCC compilation options
- C language string function: strlen, strcpy, strcat
- Li Hongyi machine learning team learning punch in activity day03 --- error and gradient decline
- Li Hongyi machine learning team learning punch in activity day04 - Introduction to deep learning and back propagation mechanism
- Share a multiple-choice question about the process of program compilation (including a brief discussion on the compilation process, the formation and merging process of symbol tables)
- 我的第一篇博客
- 程序环境和预处理(上):一个程序是怎么成功运行的?
- mysql 取消外键关联约束
猜你喜欢
随机推荐
Carmaker quick start lesson 4 developing 48V P1 hybrid system
数据库迁移报错解决
【codeforces 1695C Zero Path】DP
C language makes a small maze
p7 day1 初识Flask框架
SQL(MySql)菜鸟教程知识
C语言字符串介绍以及相关操作函数
Li Hongyi machine learning team learning punch in activity day06 --- convolutional neural network
分享一道关于变量的选择题(内含全局变量、局部变量、变量的作用域、生命周期知识点)
用户登录-以及创建、验证短信验证码
let、const、var之间的用法以及区别
用pygame自己动手做一款游戏01
Introduction of C language base conversion and original complement inverse code point operation
用户管理-分页
Li Hongyi machine learning team learning punch in activity day01 --- introduction to machine learning
mysql 取消外键关联约束
块,行内块元素之间存在间隙
cmd命令和npm命令
How to quickly and effectively solve the problem of database connection failure
2021 Niuke multi school training camp 5 (question b)








