当前位置:网站首页>C language sorting (to be updated)
C language sorting (to be updated)
2022-07-07 06:17:00 【Wang Xiaoxi WW】
C Language arrangement ( To be updated )
Note: according to CSDN C Language skill tree Organized topic ; The original intention is because C Language vs Java,Python More concise , There are not so many fancy language features , It's perfect for practicing algorithm problems .
List of articles
- C Language arrangement ( To be updated )
- One 、C The development of language
- Two 、 data type
- 3、 ... and 、 Operators and expressions
- Four 、 Statement and control flow
- 5、 ... and 、 Function and program structure
- 6、 ... and 、 Array
- 7、 ... and 、 The pointer
- 8、 ... and 、 character string
- Nine 、 Structure
- Ten 、 Union and enumeration type
- 11、 ... and 、 An operation
- Twelve 、 The preprocessor
- 13、 ... and 、 file
- fourteen 、 Storage management
- 15、 ... and 、 Standard function library
One 、C The development of language
- C Language features
- C Language standards , May refer to C Language standards , ANSI C, ISO C, GNU C
- C Language compilation process ( Preprocessing , compile ( Sink code ), assembly ( Machine code ), link ), May refer to C The compilation process of the language is explained in detail
Two 、 data type
- Variable type , Life cycle and Scope
- Constant 2 Types ( Values and characters ) and Definition (#define and const)
Note: Constants can also be function expressions , such as#define MAX(a,b) ((a > b) ? a : b), Reference resources Relational operator ( Judge whether the intervals overlap ) - Data type classification ( Native , The derived , User customization )
Note:- C There is no language bool,string type ; Basic types include Character , floating-point , integer and Empty type ; Derived types include Array , Pointers and functions type ; User defined types include enumeration , Structures and consortia type .
- C++ The basic types of are C Based on the basic types of language , Added bool type .
3、 ... and 、 Operators and expressions
- Assignment operator ( Pay attention to the problem of simultaneous assignment of multiple variables )
- Arithmetic operator (++i < 100 and i++ < 100 The difference between )
- Relational operator
- Logical operators ( Determine if it's a leap year ,|| and && Use )
- The comma operator , Operator priority and evaluation order ( The comma operator ), May refer to C Language comma expression in for Use in loop statements
Note: The comma operator is often used in for Circulation head Initialize or increment Multiple variables- Pay attention to the processing order of variables
- From left to right
- The value of the entire comma expression is the value of the last sub expression .
- sizeof Operator ( Output Space occupied by operands Of Byte size ), May refer to c Language data type byte size and precision
Note:sizeof It looks like a function when used ( Because there is a pair of parentheses after it ), But he is an operator . His usage is as follows 3 Kind of :- a)
sizeof( Variable name ). - b)
sizeof( Data type name ). - c)
sizeof Variable name.
- a)
Four 、 Statement and control flow
- Three numbers are sorted from small to large (swap In situ exchange )
- Judge the type of triangle ( Pay attention to the order of judging conditions )
- switch-case Rating scores
- 99 multiplication table printing (9 That's ok 9 Column )
- greatest common divisor (m) Sum of least common multiple (q)(ab = mq), May refer to Find the greatest common divisor by division
5、 ... and 、 Function and program structure
- Function declaration and definition (C Language Focus on the position of the definition of the method relative to the calling statement )
Note: Actually python Also pay attention to the position of the method definition relative to the calling statement , Just no function declaration , Only function definitions . - Formal parameter and actual parameter ( Be careful swap Time arguments are reference types , Incoming address , Formal parameters are pointer types )
- Print function call sequence (C Language ( compile ) Must pass main Function entry can execute program ,python( explain ) You don't need to )
- Going up the stairs (C Language modular design ), May refer to C Language modular programming
- Internal function (static) And external functions (extern), May refer to C In language static and extern A detailed explanation of the use of ,C Language keywords static And extern Detailed explanation of
Note:- The header file (
.h) Need to pass#defineand#endifDefine variables and functions - The source file can be divided into multiple
.cfile , Every.cFiles can correspond to one.hfile , The.hFile contains.cVariable or function declaration of file . - By default, the global variable is with
extern, That is, in the whole source program all Source file Can be accessed and modified in staticIf you modify a global variable , will Hide the global variable from other source files
- The header file (
6、 ... and 、 Array
7、 ... and 、 The pointer
8、 ... and 、 character string
Nine 、 Structure
Ten 、 Union and enumeration type
11、 ... and 、 An operation
Twelve 、 The preprocessor
13、 ... and 、 file
fourteen 、 Storage management
15、 ... and 、 Standard function library
边栏推荐
- yarn入门(一篇就够了)
- Financial risk control practice - decision tree rule mining template
- Convert numbers to string strings (to_string()) convert strings to int sharp tools stoi();
- Party A's requirements for those who have lost 800 yuan
- PTA TIANTI game exercise set l2-003 moon cake test point 2, test point 3 Analysis
- 【FPGA教程案例14】基于vivado核的FIR滤波器设计与实现
- 【FPGA教程案例13】基于vivado核的CIC滤波器设计与实现
- 【GNN】图解GNN: A gentle introduction(含视频)
- Classic questions about data storage
- Flask1.1.4 werkzeug1.0.1 source code analysis: start the process
猜你喜欢

The solution of a simple algebraic problem

Go语学习笔记 - gorm使用 - 原生sql、命名参数、Rows、ToSQL | Web框架Gin(九)
![[FPGA] EEPROM based on I2C](/img/28/f4f2efda4b5feb973c9cf07d9d908f.jpg)
[FPGA] EEPROM based on I2C

You don't know the complete collection of recruitment slang of Internet companies

PowerPivot - DAX (function)

如何在Touch Designer 2022版中设置解决Leap Motion不识别的问题?

ML's shap: Based on the adult census income binary prediction data set (whether the predicted annual income exceeds 50K), use the shap decision diagram combined with the lightgbm model to realize the

yarn入门(一篇就够了)
![[cloud native] what is the microservice architecture?](/img/84/a0ec68646083f3539aa39ad9d98749.png)
[cloud native] what is the microservice architecture?

Financial risk control practice - decision tree rule mining template
随机推荐
C note 13
Flask1.1.4 Werkzeug1.0.1 源碼分析:啟動流程
【FPGA教程案例13】基于vivado核的CIC滤波器设计与实现
Jstack of JVM command: print thread snapshots in JVM
JMeter function assistant - random value, random string, fixed value random extraction
PowerPivot - DAX (function)
[Shell]常用shell命令及测试判断语句总结
laravel 使用腾讯云 COS5全教程
Introduction to the extension implementation of SAP Spartacus checkout process
360织语发布7.0新品 为党政军、央国企打造专属“统一数字工作空间”
PTA ladder game exercise set l2-002 linked list de duplication
@Detailed differences between pathvariable and @requestparam
Database notes 04
Mac version PHP installed Xdebug environment (M1 version)
jmeter 函数助手 — — 随机值、随机字符串、 固定值随机提取
Jmeter自带函数不够用?不如自己动手开发一个
Rk3399 platform development series explanation (WiFi) 5.52. Introduction to WiFi framework composition
Understand the deserialization principle of fastjson for generics
职场经历反馈给初入职场的程序员
VScode进行代码补全