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

边栏推荐
- Selenium element operation
- Mysql速成
- 2021 Niuke multi school training camp 5 (question b)
- 创建项目 实现登录注册,生成jwt,发送验证码
- 下载url-loader,用limit指定图片大小后,显示不出图片
- C language string introduction and related operation functions
- Flask请求数据获取与响应
- 【codeforces 1695C Zero Path】DP
- 初识C语言——为什么每个C程序都有一个main函数
- Program environment and preprocessing (Part 1): how does a program run successfully?
猜你喜欢

Pytorch installation new pit

C language string function: StrCmp, strncpy, strncat, strncmp, strstr, strtok, strError

Li Hongyi machine learning team learning punch in activity day01 --- introduction to machine learning

Day3 ---Flask 状态保持,异常处理与请求钩子

元素显示模式:块级,行内,行内块,嵌套规范,显示模式转换

Dnsmasq Usage Summary

Li Hongyi machine learning team learning punch in activity day02 --- return

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

页面布局中元素定位的几种方式

The concept of cloud native application and 15 characteristics of cloud native application
随机推荐
GCC 编译选项
Graph cuts learning
Cenos7更新MariaDB
元素显示模式:块级,行内,行内块,嵌套规范,显示模式转换
Share a multiple-choice question about variables (including global variables, local variables, the scope of variables, and life cycle knowledge points)
C语言函数入门介绍
分享一道关于#define的选择题(内含#define在预编译时的替换规则,程序环境和预处理相关知识)
用户登录-以及创建、验证短信验证码
Day4 --- Flask 蓝图与Rest-ful
Hi3516dv300 environment setup
Collation of several difficult methods in pytorch --gather & squeeze & unsqueeze
规格管理,及规格选项管理功能实现
封装JWT
后台订单管理
软件测试面试题(重点)
md5 密码加密
Dnsmasq Usage Summary
Numpy data type conversion
分享一道关于程序编译过程的选择题(内含编译过程浅谈,符号表的形成合并过程)
SQL database → constraint → design → multi table query → transaction