C programming - advanced data types - Enumeration

Catalog Article directory Catalog Preceding list Declare enumeration type Define variables of enumeration type Variable enumeration type enumeration value of variable Enumeration used in switch statement Convert integer to enum Preceding list <Program compiling process and GCC compiler> <C prog ...

Posted on Sat, 04 Apr 2020 09:19:43 -0700 by NME

Longest substring without repeating characters

1. Problem: give a string and find out the longest substring without repeated characters The longest unrepeated substring of abcbc is abc length is 3   2. Method 1: Violence Law We can find out each substring, and then find the longest substring without repeating characters. The method is simple and crude. The code is as follows:    1 #incl ...

Posted on Fri, 03 Apr 2020 09:34:31 -0700 by powlouk

One of the little games ------ greedy snake tutorial

1. In my opinion, the most important thing to learn programming is multi action handwritten code. Only when you really write, can you find your own problems, find and correct them, and your ability can be improved. For most people, you can be a good programmer by understanding and applying what you have learned. 2. It's a good choice to write s ...

Posted on Tue, 17 Mar 2020 02:58:16 -0700 by FloridaNutz

The first step in Linux boot: Start the assembly to call the main function

To clarify the principle, we first introduce the C-function calling mechanism, then the assembly call C-function. 1. C Function Call Mechanism For functions in an assembly, it uses a stack to pass parameters and store temporary variables.The frame pointer EBP is used to locate parameters and temporary variables, while the stack poi ...

Posted on Sat, 14 Mar 2020 09:36:01 -0700 by mimilaw123

STM32F107 transplantation canfestival

brief introduction The following is a porting record of the canfestival protocol stack when learning Canopen. The reference links are strongerhuang. Platform introduction MCU : STM32F107VCT6 RTOS : RT-Thread RTOS ST_Lib : STM32F1xx HAL Driver version number V1.1.4 Compiler: MDK 5.28 canfestival Source: Enter Official website of canfestival ...

Posted on Tue, 10 Mar 2020 20:24:28 -0700 by nolos

Texas poker problem solving

Title Description Recently, aqua has become addicted to Texas poker. So she found a lot of people to play with her. Due to the large number of people, aqua has to change the rules of the game: All playing cards only look at numbers, not colors. The value of each card is one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 (corresponding to A, 2, ...

Posted on Sat, 07 Mar 2020 08:55:46 -0800 by alexu'

if branch structure of C language

Article directory 1, Relational operators 2, Condition judgment 3, Use only if statements 4, Multiple if else statements 5, Nesting of if statements 6, Maintain good programming habits 7, Logical operators 8, Writing logical expressions 9, Logical non 10, Binomial operator 11, Homework after class 12 ...

Posted on Mon, 02 Mar 2020 21:15:29 -0800 by sssphp

19-Object Construction

Note: The content of the blog is mainly from the Ditty Software Institute. The blog is only used for personal notes. Test environment: Ubuntu 10.10 GCC Version: 4.4.5   1. Special Constructors 1) Two special constructors * parameterless constructor * Constructors without parameters * When a c ...

Posted on Sat, 29 Feb 2020 18:28:29 -0800 by GrecoClub

Data processing method -- sorting technology

Description of relevant problems in sorting: Sorting classification In Inner sorting, there are two main operations: compare and move. Comparison refers to the comparison between keywords, which is the minimum operation for sorting. Move refers to the movement of records from one location to another. ...

Posted on Wed, 26 Feb 2020 05:29:04 -0800 by drummerboy

python notes for beginners (tuples, dictionaries)

We may know that string, number, list, tuple and dictionary are the five basic data types in python. The previous article has introduced numbers, strings, lists. This article is about tuples and dictionaries. (also mention tuple modification) Tuple (the biggest difference with list is whether it can b ...

Posted on Mon, 24 Feb 2020 03:32:29 -0800 by Pegasys