PTA bracket question

Parenthesis problem Author: Li Tingyuan Setting: China Civil Aviation Flight Institute Time limit: 400 ms Memory limit: 64 MB Code length limit: 16 KB Problem description Given a string of characters, no more than 100 characters, which may include brackets, numbers, letters, punctuation marks, and spaces, programming checks whether (), [], { ...

Added by nkyoung1 on Sun, 24 Nov 2019 23:07:07 +0200

An interesting.Net Core collaborative development experience with C on Linux: Generating Linux standard user password strings

Recently, I encountered the problem of Linux user authentication in the process of the project. I thought about how to check the security of local Linux users, so I checked some data. Password Storage for Linux Looking at the data, we found that earlier Linux was stored in the / etc/password file, because the / etc/password permission control ...

Added by endersix on Mon, 11 Nov 2019 18:51:30 +0200

Eliminate the warning of dynamic request 2D array C6011, C6385, C6386 in VS

Dynamic application of two-dimensional array is realized by pointer. @wowpH The process is divided into three steps: 1. Apply for memory; 2. Use array; 3. Release memory. The code is as follows: /******************************************************************** description: Dynamic application 2D array author: wowpH csdnid: pfdvn ...

Added by vikramjeet.singla on Sun, 10 Nov 2019 17:11:52 +0200

Experiment 2 format input and output and branch statements

---Resume content start--- part 1 format output function printf() and format input function scanf() ex2_1.cpp    #include <stdio.h> int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; // Define an array a,String constants are stored continuously in the array hel ...

Added by dibyajyotig on Sun, 03 Nov 2019 21:48:07 +0200

A simple company employee information management system implemented by C language

Project requirements design requirement Function selection can be realized by menu. Users can enter different menus according to their own choices. The program does not need to save the information to a file. At the beginning of the program, the employee information is blank. You need to a ...

Added by asgsoft on Sat, 02 Nov 2019 13:52:18 +0200

Data structure algorithm learning sorting merging sorting

sort A set of ordered elements are reordered by size (as long as a comparison relationship that can return true or false is defined, not a certain value comparison). Merge sort Merging and sorting is a divide and conquer strategy, in which two sorted arrays are arranged according to the size relationship at a time. The algorithm uses recursion ...

Added by JMair on Fri, 01 Nov 2019 00:12:38 +0200

C language connects two strings

One is to use the strcat function of C language. strcat(str1,str2) can connect the string specified by str2 to the string specified by str1. The result is stored in the specified character array. The original last '\ 0' of the string specified by str1 is cancelled. Because you want to connect str2 to st ...

Added by bapi on Wed, 30 Oct 2019 21:19:08 +0200

linuxc message queuing

-- see section 15.7 of advanced programming in unix environment for details At the end of section 15.7 of advanced programming in UNIX environment, the advantages and disadvantages of message queuing are summarized. The conclusion is that they should no longer be used in new applications. Indeed, in pursuit of efficiency, we can use shared memo ...

Added by Ekano on Tue, 22 Oct 2019 18:32:22 +0300

A precise delay method in Cortex-M kernel

This paper introduces a precise delay method in Cortex-M kernel Preface Why study this method of delay? Many times when we run the operating system, we usually use a hardware timer - SysTick, while the clock beat of our operating system is generally set to 100-1000HZ, that is, 1ms - 10ms to generate an interrupt. Many bare metal tutorials use ...

Added by ERuiz on Thu, 17 Oct 2019 00:26:12 +0300

Serial DMA of STM32 receives indefinite length data

Introduction When using stm32 or other single-chip computers, serial communication is often used, so how to effectively receive data? If this data is indefinite, how can it be received efficiently? Classmate A: when the data comes, it will enter into the serial port and interrupt. Just read the data in the interrupt!Interrupt is to interrupt th ...

Added by bobbyM on Wed, 16 Oct 2019 22:40:37 +0300