当前位置:网站首页>2022.1.23 diary
2022.1.23 diary
2022-06-25 05:16:00 【LF19971222】
You cannot program with TAB key .
Relatively independent program blocks should be separated by one line .
In general , Valid comments for the source program must be in 20% above .
If there is any special abbreviation in the naming , There should be notes .
Add_User This form does not allow .
#define You cannot use numbers to name .
Function parameter order point : During function call , Where the value of the variable changes ( spot ), It is called a function parameter “ Order point ”.
A comma expression has a value .
Function parameters are evaluated from right to left .
atoi(a[i]): Converts a numeric string to a numeric value .
va_list
Recursive function : On function call , Calling one's own function directly or indirectly is called recursive function .
form :
- Call directly ------ Direct Recursion
- Indirect invocation ------ Indirect recursion

Recursive conditions :
- There must be a statement to complete the function task
- A test to determine whether recursive calls can be avoided
- A recursive call statement ; The parameters of this statement should gradually approach the end condition , So as to finally break the recursion
- Test first , Post recursive call .
1、 A recursive call is not a recopy of the function , Every time it's called , New local variables and formal parameters will reallocate memory units in memory , And restart execution with a new variable ; Every recursive return , The local variables and formal parameters of the current calling layer are released , And return to the place where it was last called to continue execution ;
2、 Recursive calls generally do not save memory space , Because each call produces a new set of local variables , So as not to destroy the local variables of the upper layer ;
3、 Recursive calls generally do not speed up the execution of a program , Because each call must protect the upper local quantity ( The scene ), When returning, the upper local quantity must be restored , Take up execution time ;
4、 In recursive functions , There must be a condition to end recursion ;
5、 The advantage of recursive call is that it can solve some problems that are difficult to be solved by iterative algorithm .
1、 The creation of binary tree 、 Traverse 、 Balanced binary tree implementation code ;
2、 Hashtable
3、 Sorting method : Dichotomy 、 Insertion method
Function to return pointer value :
Format : type * Function name ( Parameter list )
* Function names cannot be surrounded by parentheses , Because parentheses have priority over * high . First a Combined with its subsequent parameters , indicate a Is the function name , Then with * combination , Indicates that it is a pointer function .
Int a[3][4]; a[i][j]
a : Indicates the starting address of the array name
i The address of :a +i*l (l Is the byte length )
a[0],a[1],a[2] Can be seen as a[3][4] The array name of a one-dimensional array of rows

Enter the serial number to list the student's grades in four courses :

A function pointer : The function pointer is the physical entry address of the function . That is, at compile time , Assigned physical entry address .
( Functions can be called through this pointer .)
Int(*p);
int max(int x,int y);
p=max;
take max There are three forms of the value of :max(a,b);p(a,b);(*p)(a,b)

Function return pointer considerations :
Local variable address cannot be returned .
solve :
1、 Global variable address
2、 Dynamically allocate memory space
3、 Static local variables
Function definition considerations :
- Error return code
- Check the entry parameters of function parameters
- Control of function scale
- Single function
- Do not write functions that depend on other internal implementations
- Function arguments don't have to be too many
- Structure as function parameter , Try to use pointers
Write the function for all operations of string . Calling library functions... Is not allowed .
A pointer variable 8 Bytes .
边栏推荐
- Prototypical Networks for Few-shot Learning
- [keil] GPIO output macro definition of aducm4050 official library
- TX Text Control 30.0 ActiveX
- Charles and iPhone capture
- Reading and writing of nodejs excel (.Xlsx) files
- buuctf(re)
- Five simple data types of JS
- Use js to simply implement the apply, call and bind methods
- Summary of SQL injection (I)
- Everything is an object
猜你喜欢

Enhanced paste quill editor

Difference between asemi high power FET and triode

《QDebug 2022年6月》

Use serialize in egg to read and write split tables

Route parameters to jump to the page and transfer parameters -- > hidden parameter list

IronOCR 2022.1 Crack

In Net 6 using dotnet format formatting code

Visual studio 2022 interface beautification tutorial

What if win11 Bluetooth fails to connect? Solution of win11 Bluetooth unable to connect

XSS (cross site script attack) summary (II)
随机推荐
Characteristics of ES6 arrow function
Enhanced paste quill editor
Penetration information collection steps (simplified version)
TeeChart Pro ActiveX 2022.1
Install pytorch through pip to solve the problem that torch cannot be used in jupyter notebook (modulenotfoundererror:no module named 'Torch').
Customize the console plot result style
Database low-end SQL query statement fragment
hr竟主动给这位测试小姐姐涨工资,她是怎么做到的?
Edge loss interpretation
Essais de pénétration - sujets d'autorisation
Dynamic programming example 1 leetcode 322 coin change
dotnet-exec 0.4.0 released
2021-03-23
JS function to realize simple calculator
Mobile number regular expression input box loses focus verification
What is Ethernet and how to connect the computer
渗透测试-目录遍历漏洞
Google Earth Engine(GEE)——全球JRC/GSW1_1/YearlyHistory数据集的批量下载(中国区域)
H5 native player [learn video]
Keyboard key code value