Advanced C language pointer
catalogue
Character pointer
Pointer array
Array pointer
Function pointer
Function pointer array
Pointer to array of function pointers
Callback function
Character pointer
Character pointer: char*
int main()
{
char ch = 'w';
char * pc = &ch;//pc is a variable that points to a character
const char* p = "hello bit";//"hell ...
Posted by jasonc310771 on Thu, 04 Nov 2021 18:59:47 -0700
Some understanding of minute statement and loop statement in C language
preface
These two days, I have learned the knowledge of branch statements and circular statements in C language, and my understanding and understanding of C language is finally on track. Branch and loop make the program have unlimited possibilities, so that the program is no longer rigid and can only execute one ...
Posted by leeperryar on Thu, 04 Nov 2021 17:41:22 -0700
Linux thread scheduling strategy and priority experiment (picture and text)
Linux thread scheduling strategy and priority experiment
What is thread scheduling policy?
The Linux kernel has three scheduling algorithms:
1,SCHED_OTHER time-sharing scheduling strategy, 2,SCHED_FIFO real-time scheduling strategy, first come first serve 3,SCHED_RR, real-time scheduling strategy, time slice rotation
Where, SCHED_FIFO and S ...
Posted by giannis_athens on Thu, 04 Nov 2021 12:49:55 -0700
[LeetCode stack and queue]: Classic OJ questions about stack and queue (implemented in C language and explained in detail with attached drawings)
1. Bracket matching problem
LeetCode link: [20. Valid brackets] This problem is a classic example of using stack to solve problems; The idea is as follows: Traverse the string. If it meets the inverted left parenthesis, it will be put on the stack. If it meets the inverted right parenthesis, it will take the element at the top of the stac ...
Posted by skicrud on Thu, 04 Nov 2021 11:34:40 -0700
Introduction to algorithm C-19. Delete the penultimate node of the linked list
LeetCode problem brushing - algorithm learning plan (Introduction)
Title Description
Introduction of ideas
Personal idea: first find out which node to delete is the first node of the linked list (index=len + 1 -n). If it is the first node (head), move the head to the right (head = head - > next); If it is not the head node, u ...
Posted by mchaggis on Thu, 04 Nov 2021 09:54:12 -0700
How to import pictures into.gba files
Reference Text https://blog.csdn.net/weixin_43837555/article/details/88326567
GBA Development Kit - DevKitAdv DevKitAdv consists of two main parts: the GCC++ compiler and the GBA library. The GCC++ compiler functions much like our common VC, except there are few text editors to edit the source code, and there is no support for class es, which ...
Posted by jandrews3 on Thu, 04 Nov 2021 09:04:22 -0700
[C language] files can be operated like this (code demonstration + detailed explanation + application)
This blog shares with you the knowledge about the operation of C language files, exchanges with each other and makes common progress
What is a file?
The code we wrote earlier uses "variables", or memory
Memory characteristics
Small capacity, speed block, data loss after power failure, relatively expensive
But memory can't ...
Posted by jcantrell on Wed, 03 Nov 2021 23:10:45 -0700
Teach you by hand to realize the programming and debugging of MODBUS slave through HAL Library - the improvement of serial port and timing function
catalogue
1.STM32CubeMX operation
2. Program perfection
2.1 perfect usart.h
2.2 improve usart.c
2.2.1 header file improvement
2.2.2 add callback function
2.2.3 serial port initialization function
2.3 perfect tim.h
2.4 improve tim.c
2.4.1 improve header file
2.4.2 improve callback function and initialization fun ...
Posted by Gazan on Wed, 03 Nov 2021 21:06:49 -0700
2021-10-29 Compilation Principle Experiment 2 -- lexical analysis
1, Experimental requirements
Based on the previous experiment, write a program to analyze the source code written in c-language and print the syntax tree. The main analysis tool used in the experiment is Bison, which uses C language to complete the program.
Basic Requirements a. Parsing the program and outputting the parsing results; b. B ...
Posted by Arrow on Wed, 03 Nov 2021 11:17:44 -0700
C language daily practice - day 52: an even number can always be expressed as the sum of two prime numbers
C language daily practice November 3, 2021
Title Description
An even number can always be expressed as the sum of two prime numbers
analysis
I'm curious about what this question asks me to do, proof? I can only think of this, so simply prove it (for fun) (but most people on the Internet regard it as "entering an even number and r ...
Posted by kumarsatishn on Wed, 03 Nov 2021 10:59:35 -0700