C language summary pointer (continuously updated)

Latest update time: December 2021 twelve Environment: vs2019, x86 compilation; 64 bit win10 Source code (including games) uploaded to 11, Pointer 11.1 what is the pointer A pointer is actually an address. First, learn how memory addresses are numbered. Take a 32-bit machine as an example: 32 bits – 32 address lines – physical l ...

Posted by jackofalltrades on Mon, 13 Dec 2021 03:07:16 +0100

Chapter V summary

Example 5.1 Assuming that China's total population this year is 1.3 billion, if it increases by 2% per year, the annual population in 10 years from now will be calculated #include<stdio.h> #include<math.h> int main() { int n = 13, year; double number, rate = 0.02; for (year = 1; year <= 10; year++) { number = n * pow( ...

Posted by er0x on Sat, 11 Dec 2021 04:07:01 +0100

Stack and Queue (Sequential Storage)

Because of the lack of c language library functions, when doing some arithmetic problems, when you want to call some functions of the data structure, you always have to tap them manually or look around, so I think why not summarize some commonly used functions into it. When you write down a small book, you can only use Ctrl+C,V once (doge) to i ...

Posted by vboyz on Fri, 10 Dec 2021 18:05:11 +0100

7-5 Experiment 1_ 5_ Data type (100 points)

C language provides programmers with rich data types. The commonly used data types are character type (char type), short type (short type), integer type (int type), long type (long type), extended long type (long type), single precision floating point type (float type) and double precision floating point type (double type). Your task is to defi ...

Posted by aouriques on Fri, 10 Dec 2021 15:46:19 +0100

C language - inline function, recursive function, pointer function

1. Preface This article introduces the knowledge points of C language, such as inline function, recursive function, function pointer, pointer function, local address, const keyword, extern keyword and so on; These knowledge points are very common and important in actual project development. The following describes each knowledge point in the ...

Posted by lyonsperf on Fri, 10 Dec 2021 14:05:55 +0100

C/C + + game project: minesweeping

The original version of mine sweeping can be traced back to 1973, a game called "square". Soon, "square" was rewritten into the game "Rlogic". In "Rlogic", the player's task is to act as US Marine Corps Team members, find a safe route without mines for the command center. If all the roads are blocked by ...

Posted by JCBarry on Fri, 10 Dec 2021 12:42:11 +0100

const in C language, have you got it?

1, What is const? Const is a key word of C language (ANSI C), which plays an important role. It defines that a variable is not allowed to be changed and has a static effect. Using const can improve the security and reliability of the program to a certain extent. In addition, when watching other people's code, a clear understanding of th ...

Posted by aneesme on Thu, 09 Dec 2021 17:55:25 +0100

"Fundamentals of programming 2021" topic set 3 problem solution I

catalogue 5-1 5-2 5-3 5-4 5-5 5-6 5-1 Calculate the piecewise function, and the test data are - 2, 3 and 7 respectively.   #include <stdio.h> #include<math.h> int main( ){ float x,f; int i; for(i=0;i<3;i++){ scanf("%f",&x); if(x<0) f=fabs(x+1); else if(x<=5) f=2*x+1; else f=sin( ...

Posted by neuroxik on Wed, 08 Dec 2021 12:58:28 +0100

[C language] simple game item: "don't step on white blocks"

order I suddenly like the word "startle Hong". Love at first sight is too superficial. Love over time is too pale. Others look at you secretly. Hi! This is the fox~ The new week begins again. Time flies quickly. I don't know what to share with you. If you want to send partial algorithms, you're afraid that you don't understand, a ...

Posted by jcornett on Wed, 08 Dec 2021 00:59:13 +0100

Basi c Notes (Debt Payment)

c Language Basics Record 1. Data Types Data type: Essentially an alias for a fixed-size memory block Variable: An alias that is essentially a continuous memory space int a; //Tell the compiler to allocate 4 bytes of space int b[10]; //40 bytes printf("b:%d, b+1:%d, &b:%d, &b+1:%d\n", b, b+1, &b, &b+1); // B As with &b, ...

Posted by nextman on Wed, 08 Dec 2021 00:41:42 +0100