当前位置:网站首页>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

边栏推荐
- Li Hongyi machine learning team learning punch in activity day02 --- return
- Flask的使用
- Sharing force buckle-189. Three solutions of rotation array
- 初识C语言——为什么每个C程序都有一个main函数
- Li Hongyi machine learning team learning punch in activity day03 --- error and gradient decline
- 小米商城项目_注册
- 云E办项目之部门管理
- Makefile is easy to understand and explain
- C语言中堆内存介绍和管理
- 封装JWT
猜你喜欢

Xiaomi mall project_ register

Share a multiple-choice question about variables (including global variables, local variables, the scope of variables, and life cycle knowledge points)

上传七牛云的方法

p7 day1 初识Flask框架

初始C语言——关键字static的作用

强制登录,七牛云上传图片

登录到主页功能实现

2021 Niuke multi school training camp 5 (question b)

Sharing force buckle-189. Three solutions of rotation array

Redis cluster
随机推荐
Trying to evolve_ My first CSDN blog
c语言字符串函数上:strlen、strcpy、strcat
后台订单管理
arguments
node 安装调试
流程控制-分支
【codeforces 1695C Zero Path】DP
Share a multiple-choice question about define (including the replacement rules, program environment and preprocessing related knowledge of define during precompiling)
通用视图,DRF视图回顾
Makefile is easy to understand and explain
Qsort - the sorting function in C language (with void*, callback function knowledge points
元素显示模式:块级,行内,行内块,嵌套规范,显示模式转换
用户登录-以及创建、验证短信验证码
软件测试面试题(重点)
Makefile 通俗易懂详解
Pytorch installation new pit
Introduction to C language pointer
封装JWT
qsort — c语言中自带的排序函数(附带void*、回调函数知识点
Seckill system design