String reverse order - multiple methods

Reverse the order of strings, taking the string abcdef as an example 1. With additional arrays #include <stdio.h> #include <string.h> int main() { char str[] = "abcdef"; //Find the size of the string, including '\ 0' int sz = strlen(str) + 1; //Dynamic memory allocation, apply for a character array of sz size ...

Posted by zechdc on Tue, 17 May 2022 03:07:02 +0300

Simple point - c-Lesson5 (structure, branch statement (if, switch), difference between p and * p)

1. Structure (1) A structure definition is a collection that describes different data types or the same data type. (complex type) (2) Access structure: pointer access structure (- >); Variable name access structure (.) (3) The difference between p and * p depends on whether it is a left value or a right value. #if 1 #include < ...

Posted by heminfotech on Mon, 16 May 2022 23:33:28 +0300

UNIX Advanced Environment Programming Learning Notes 6_ Process Control

1. Function fork Function prototype: #include<unistd.h> pid_t fork(void); The fork function creates a subprocess and returns it twice. Child process ID and 0, respectively. It is equivalent to copying the same process and executing it at the point where fork is called while the program is running. It has two main purposes: 1. Parent a ...

Posted by hoopplaya4 on Sun, 15 May 2022 22:01:01 +0300

The most complete and detailed explanation of three chess

If you want to write the sanbang code, you must have a start-to-finish idea: First of all we have three files game.h - declaration of the function game.c - function implementation test.c - test game Create a menu (menu()) //menu selection interface void menu() { printf("*****************\n"); printf("**** 1.play ****\n"); pr ...

Posted by commandonz on Sun, 15 May 2022 01:31:55 +0300

[IT goose C/C + + Series Courses] pretty boy, I want to learn programming. Why tell me about the operating system?

Day01: Let's regain our love for our dream lover C and C + + [IT C/C + + Series Courses] Operating System Fundamentals Course A "shuangwen" programming tutorial of "against the sky" BILIBILI IT goose BILIBILI@IT goose Course introduction: [C/C + + Series Courses] Operating System Fundamentals Course This cours ...

Posted by PHPcoder25 on Sun, 15 May 2022 00:51:08 +0300

FFmpeg old video coding and new video flow

Call process of old video coding (1)API registration Only the interface of libavcodec part is used, so avcodec can be used when registering to use FFmpeg interface_ register_ All to register avcodec_register_all(); (2) Find encoder After the registration operation is completed, you first need to find the encoder you use. You can use the i ...

Posted by dannydefreak on Sat, 14 May 2022 13:06:19 +0300

STM32CubeMX series | I2C bus

I2C bus 1 Introduction 1.1 Introduction to I2C bus The I2C (Inter-Integrated Circuit) bus is a two-wire serial bus developed by PHILIPS, which is used to connect microcontrollers and their peripheral devices. It is a serial bus composed of data line SDA and clock line SCL, which can send and receive data. Two-way transmission is performed be ...

Posted by lanbor on Sat, 14 May 2022 12:49:37 +0300

[C language] the realization of Sanzi chess and some small improvements in AI (attack, defense, occupying favorable terrain)

This blog is aimed at C language beginners. For example, the AI part of the computer is only some relatively simple improvements (attack, defense, occupying favorable terrain), and does not involve intelligent algorithms (such as game tree). Some of the codes contain my understanding of programming. If there are deficiencies, please give me mor ...

Posted by ryy705 on Fri, 13 May 2022 23:06:01 +0300

Modular programming

Modular programming 1. Why modular programming? A: if I were Party A, I would put forward my requirements to you. After a month, you finally wrote the code I wanted. However, if you write all the functions in a c file, do you think I will ask you for later maintenance? Impossible, because I understand your whole program framework, I will main ...

Posted by benjam on Fri, 13 May 2022 03:45:45 +0300

Implementation of bidirectional linked list (c language data structure)

catalogue Functions to be realized Realization of specific functions 1. Create a new node 2. Initialization of bidirectional linked list 3. Tail insertion of two-way linked list 4. Printing of bidirectional linked list 5. Header deletion of two-way linked list 6. Destruction of two-way linked list 7. Node search of bidirectional link ...

Posted by wolfcry044 on Fri, 13 May 2022 02:09:49 +0300