Non recursive traversal algorithm of binary tree

Non recursive traversal algorithm of binary tree Traversal of binary tree refers to accessing each node of binary tree, and each node is accessed only once. The traversal of binary tree can be divided into four ways according to the composition of binary tree and the order of accessing nodes: first order traversal, middle order traversal, s ...

Posted by aleigh on Tue, 19 Oct 2021 02:23:39 +0200

Process (exec function family)

In the previous section, we know that the child process is a replica of the parent process, and the program executed by the child process is the same as that of the parent process (the program after fork()), so if you can only rely on the code of the parent process, the role of the child process is not very great. Is there any way to prevent th ...

Posted by brockie99 on Mon, 18 Oct 2021 22:14:14 +0200

2021-10-15 C language function

Day8 function Basic usage of functions 1. Definitions A function is a code module that completes a specific function. Its program code is independent. It usually requires a return value or a null value. The general form is as follows: <data type><Function name>(<Formal parameter description>){ Statement sequence; return [(&lt ...

Posted by ym_chaitu on Fri, 15 Oct 2021 22:43:20 +0200

String and string function summary

Learning objectives: Master the usage of string function in C language and its simulation implementation The processing of strings and characters in C is very cumbersome, but there is no string type in C language! Strings are usually placed in constant string bars and character arrays, where string constants are applicable to string functions ...

Posted by Sorrow on Fri, 15 Oct 2021 22:40:41 +0200

C programming summary

C programming Computer program and C language program A set of instructions that a computer can recognize and execute; Each instruction corresponds to a specific operation of the computer; All operations of the computer are controlled by a program. language Machine language: binary languages (0 and 1) that can be directly recognized by t ...

Posted by tallberg on Fri, 15 Oct 2021 20:53:03 +0200

C language - Advanced pointer

1, Array parameter, pointer parameter When writing code, it is inevitable to pass [array] or [pointer] to the function. How to design the parameters of the function? 1. One dimensional array parameter transfer void test(int arr[])//ok {} void test(int arr[10])//ok {} void test(int* arr)//ok {} void test2(int* arr[20])//ok {} void test2(i ...

Posted by Dave100 on Thu, 14 Oct 2021 21:17:05 +0200

C Primer Plus Chapter 7

        1, if statement         General form if(expression) { statement; }         If expression is true, execute the statement, otherwise skip the statement           2, If else         General form if(expression) { state ...

Posted by soto134 on Thu, 14 Oct 2021 09:35:32 +0200

c + + implementation of check-in system (simple)

preface Last week, I helped my classmates do a project assignment. See the following figure for specific requirements. The implementation language is c + +. Today, I decided to write this program again. The specific and complete code is implemented at the end of the article Requirements analysis -- programming ideas Structure, class o ...

Posted by mayus on Thu, 14 Oct 2021 06:46:52 +0200

Readme report for C language beginners (Continued)

Preface: I haven't sorted it out for a long time, but I'm actually lazy and haven't learned much, so I'll briefly talk about what I've learned at the beginning, and talk about the problems encountered in learning and a little trivial experience. (the last part of the previous article is about the tips of variable types) Small review: 1.const ...

Posted by taiger on Wed, 13 Oct 2021 15:42:21 +0200

Operating system experiment 1: clock interrupt program design

1. Test requirements: Draw a car in the specified window area of the screen (or load a car picture and remove the background), and let the car move at a uniform speed from the upper left corner to the lower right corner of the window. Specific requirements are as follows: (1) The trolley must be from the upper left corner to the lower right ...

Posted by Kenny Pollock on Wed, 13 Oct 2021 02:22:47 +0200