当前位置:网站首页>Some knowledge of the initial C language
Some knowledge of the initial C language
2022-06-25 13:20:00 【LIn_ jt】
Preface
I'm learning c Language , We will be right. c Make a general understanding of each classification knowledge of language , This paper will introduce several classification knowledge ( Follow up will continue to supplement )
Text
One . first c Language program , Please look at the chart below.
Here main Function is the entry of the program , There is and only one in a project main function .
And the first 6 Yes printf The function is a print function , That is, output... On the screen “ ” Content between , The result of the program is :
Two . data type
1. Data types are used to define variables ,c The language mainly provides the following data types :
2. The space occupied by each data type
Look at the following procedure :
Here sizeof keyword , It means to calculate the memory occupied by an object , Unit is byte, The following are the output results :
1 2 4 4 8 4 8( In the order shown above ) That is, the memory size occupied by each data type .
3、 ... and . Variables and constants
1. Variable
Variables are literally variable quantities , The method of defining variables is shown in the figure below :
( It is recommended to assign initial values to variables when creating them .)
2. Classification of variables
There are two kinds of variables , One is local variable , One is Global variables .
For local variables : Is defined in braces ( Code block ) The variables in are local variables .
For global variables : Variables defined outside braces are global variables , Please look at the chart below. :
by the way: When the variable names of local variables and global variables are the same , Local variables take precedence :
example :
The above is the initial c Part of the knowledge of language , Subsequent updates will continue !
边栏推荐
- Stockage des données en mémoire
- OpenStack学习笔记之-Nova组件深入了解
- Introduction to mongodb chapter 01 introduction to mongodb
- Analyse de l'optimisation de la réécriture des requêtes lazyagg de l'entrepôt
- Heavyweight live | bizdevops: the way to break the technology situation under the tide of digital transformation
- 1251- client does not support authentication protocol MySQL error resolution
- Include what you use to save chaotic header files
- nacos无法修改配置文件Mysql8.0的解决方法
- 字符串各操作函数与内存函数详解
- 15 basic SEO skills to improve ranking
猜你喜欢
学习编程的起点。
. NET in China - What's New in . NET
Seven competencies required by architects
深圳民太安智能二面_秋招第一份offer
坡道带来的困惑
Sword finger offer day 2 linked list (simple)
Uncover gaussdb (for redis): comprehensive comparison of CODIS
leetcode - 384. 打乱数组
Serenvlt first met
KDD 2022 | graphmae: self supervised mask map self encoder
随机推荐
初始c语言的知识2.0
德国举行全球粮食安全团结会议
About data storage in memory
C# 切换中英文输入法
Include what you use to save chaotic header files
关于三子棋游戏的简易实现与N子棋胜利判断方法
Back test of quantitative trading - tqzfuturerenkowavestrategy
关于数据在内存中的存储下
Reload cuda/cudnn/pytorch
解析數倉lazyagg查詢重寫優化
《MongoDB入门教程》第01篇 MongoDB简介
剑指 Offer 04. 二维数组中的查找
Qt显示FFmpeg解码的图片
原生js---无限滚动
Sword finger offer II 029 Sorted circular linked list
Custom vertical table
leetcode - 384. 打乱数组
Sword finger offer 04 Find in 2D array
KDD 2022 | GraphMAE:自监督掩码图自编码器
[flask tutorial] flask overview