当前位置:网站首页>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 !
边栏推荐
- [flask tutorial] flask development foundation and introduction
- Always maintain epidemic prevention and control and create a safe and stable social environment
- Download File blob transcoding
- J2EE从入门到入土01.MySQL安装
- 字节跳动Dev Better技术沙龙来啦!参与活动赢好礼,限时免费报名中!
- Analyse de l'optimisation de la réécriture des requêtes lazyagg de l'entrepôt
- 坡道带来的困惑
- [data visualization] antv L7 realizes map visualization, drilldownlayer drill asynchronously obtains data, and suspends the warning box
- Django framework - caching, signaling, cross site request forgery, cross domain issues, cookie session token
- C # switch between Chinese and English input methods
猜你喜欢
随机推荐
始终保持疫情防控不放松 营造安全稳定的社会环境
Lexical trap
爱可可AI前沿推介(6.25)
nacos无法修改配置文件Mysql8.0的解决方法
KDD 2022 | graphmae: self supervised mask map self encoder
[turn] starting from the end, analyze in detail how to fill in the college entrance examination volunteer
Which Chinese virtual human is better? Sullivan, IDC: Xiaobing Baidu Shangtang ranks in the first echelon
坡道带来的困惑
关于数据在内存中的存储下
剑指Offer 第 2 天链表(简单)
Introduction to mongodb chapter 01 introduction to mongodb
Assemble relevant knowledge points of flag bit (connected)
QT mouse tracking
与生产环境中的 console.log 说再见
初始c语言的知识2.0
解析數倉lazyagg查詢重寫優化
Solve the problem that yarn cannot load files in vs Code
WIN10环境下配置pytorch
关于一道教材题的讲解
Summer Ending








