C language notes
Notes on C language
4. Branching
Between 80 and 90! \n"); case 'C': printf("your score is between 70 and 80! \ n"); case'D ': printf("your score is between 60 and 70! \ n"); case 'F': printf("your score is below 60! \ n"); default: printf("please enter a valid grade \ n"); } return 0;
} Please ent ...
Posted by Megahertza on Mon, 31 Jan 2022 07:32:58 +0100
Novice entry programming needs to master several violent algorithms c/c + + and convenient data structures
I will put some main knowledge points that need to be used next to the introduction of the algorithm, and I introduce an algorithm by solving a problem rather than directly;
First: find the most value in an array
Challenge arena method:
const int inf=10e9;
int main(){
int n; scanf("%d",&n);
int min=inf,max=-inf;//Set the ma ...
Posted by Waldir on Mon, 31 Jan 2022 05:28:59 +0100
[PAT (Basic Level) Practice] - [detailed explanation of common usage of map] 1044 Mars numbers
I. [Topic difficulty]
Class B
II. [Title No.]
1044 Mars number (20 points)
III. [Title Description]
Martians are counted in hexadecimal:Earthman's 0 is called tret by Mars.The Martian characters of earthman numbers 1 to 12 are: jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec.The Martians call the 12 high-order numbers after ...
Posted by sriusa on Mon, 31 Jan 2022 04:10:24 +0100
Notes on 30 days homemade operating system -- Day7
1. Get key code
There is little difference between mouse and keyboard in code implementation, so we can imitate the other as long as we complete one of them. Because after pressing a key before, nothing else can be done. Modify init inthandler21 function in C
#define PORT_KEYDAT 0x0060 / / the device number is specified by IBM. For detail ...
Posted by mgoerz on Sun, 30 Jan 2022 19:53:06 +0100
C language to achieve three chess game
To realize the three chess game
In the initial work, an identifier is defined by #define to represent a constant (the horizontal and vertical coordinates of the chessboard) (because there are many coordinates that need to be used in the writing of the code. When reading the code, the reader may be tired of understanding what the current value ...
Posted by doni49 on Sun, 30 Jan 2022 18:24:45 +0100
Data structure life from scratch - array and pointer basis (including personal in-depth understanding)
Freshmen enter the data structure. Please give advice on mistakes and omissions and make progress with you.
Arrays and pointers
What is an array
A contiguous space (clearly telling the compiler how many blocks of space there are) is used for the same type of data The name of the array is for the user to see. In the actual memory, the ad ...
Posted by Morbid on Sun, 30 Jan 2022 16:22:55 +0100
The most classic language makes the most classic game ゚ヽ(。◕‿◕。)ノ゚.:。+ ゚
Gobang 2.0 coming: ゚ヽ(。◕‿◕。)ノ゚.:
Function overview:
It can realize man-machine combatEveryone can fightYou can surrender and count the game time
Compared with the previous Gobang, the core algorithm has not changed. It still judges whether there are five sub lines in the current state (in four directions) of each chess piece. If there are f ...
Posted by papacostas on Sun, 30 Jan 2022 09:54:46 +0100
From zero foundation to complete mastery of C language series Chapter 2 - branch and loop statements
Foreword: in the last article, we have learned statements, branch statements and while loops. Next, let's learn do... While loops, for loops and goto statements. (since this article is consistent with the previous article, the article directory is set according to the content of the previous article)
3.2 for loop
We have learned the while ...
Posted by little_webspinner on Sun, 30 Jan 2022 07:26:29 +0100
C language: Advanced pointer
Character pointerArray pointerPointer arrayArray parameter passing and pointer parameter passingFunction pointerFunction pointer arrayPointer to array of function pointersCallback functionPointer and array analysis of interview questions
Character pointer
One of the pointer types is character pointer char*General use
char* p="abcde"; //C ...
Posted by devangel on Sun, 30 Jan 2022 04:03:10 +0100
Operation of linked list in Linux system
Operation of Linux kernel queue
This system imitates the queue implementation in Linux. It is a two-way linked list. Personally, I think the implementation of two-way linked list in Linux is simply wonderful.
1, Implementation of conventional linked list
When learning the data structure course, they all learned the data structure of two- ...
Posted by o2cathy on Sat, 29 Jan 2022 18:16:41 +0100