C language: detailed explanation of pointer 1

Review the concept of pointer A pointer is a variable used to store an address, which identifies a space Memory is divided into small memory units. Each memory unit has a number, which is called address. We usually call the "container" containing address as pointer Memory number = address = pointer Pointer or address, to be store ...

Added by username123 on Sat, 05 Mar 2022 07:47:38 +0200

Data structure sequence table (c language)

Storage structure of sequence table (1) When a high-level programming language such as c language is used to describe the problem of data structure, the method to realize the sequential storage structure is to use array. (2) There are two kinds of arrays: static array and dynamic array. The application and release of static array storage space ...

Added by herreram on Sat, 05 Mar 2022 02:04:46 +0200

C language bit operation (summary)

4.2.1. Bitwise operators 4.2.1.1 bit and& (1) Note: the bit and symbol are one &, and the two & & are logical and. (2) Truth table: 1 & 0 = 0 1 & 1 = 1 0 & 0 = 0 0 & 1 = 0 (3) It can be seen from the truth table that the characteristic of bit and operation is that only 1 and 1 are located, and the result is 1, ...

Added by skripty on Fri, 04 Mar 2022 22:33:40 +0200

C language - file operation

What are the files in C language The so-called file is a collection of data stored in external media (such as. TXT. BMP. Jpg. Exe. Rmvp, etc.). These files have their own purposes. We usually store them on disk or removable media. Three elements of a file: file path, file name and suffix. Predefined standard flow: stdin is a FILE * type exp ...

Added by cap2cap10 on Fri, 04 Mar 2022 19:10:06 +0200

Test questions and detailed explanation of the 10th Lanqiao cup provincial competition in 2019 (Java undergraduate group C)

[Blue Bridge Cup] summary of real questions and solutions over the years Results fill in the blanks (full score 5 points)Results fill in the blanks (full score 5 points)Results fill in the blanks (full score 10 points)Results fill in the blanks (full score 10 points)Results fill in the blanks (Full Score: 15 points)Programming (Full Score: 15 ...

Added by Wien on Fri, 04 Mar 2022 16:23:21 +0200

Function implementation c language basic problem + duplicate disk

Unknowingly, it was 2022. I felt that I was too delayed during the holiday, so I knocked the code during the online class_ (: з」 ∠)_ Catalogue 1. Early stage code: output prime numbers within 100 ~ 200 ----- > function realization + sublimation (judge whether the input is prime). 2. Early stage code: output leap year from 1000 to ...

Added by junkie_doodle on Fri, 04 Mar 2022 11:43:55 +0200

How does the linker resolve global symbols defined in multiple locations?

At compile time, the compiler exports each global symbol as a strong symbol or a weak symbol to the assembler, which implicitly encodes this information in the symbol table of the relocatable object file. Functions and initialized global variables get strong symbols. Uninitialized global variables get weak symbols. For the following example pro ...

Added by pbjpb on Fri, 04 Mar 2022 05:45:21 +0200

c language memory distribution and pointer assignment error (RO area error)

catalogue Memory distribution in C Memory space is divided into heap, stack and program area Stacking area:    that is, dynamic memory allocation. Programmers can apply for any size of space through malloc, but remember to release free after using this space, so as not to cause memory leakage. Stack area:    the st ...

Added by cyberRobot on Fri, 04 Mar 2022 02:45:42 +0200

Some of the C language deserve to be defined as the beautiful macro definition of the common C language header library

Original text connection: https://mp.weixin.qq.com/s/OICAfQgMKWfBLuZbp2gCBw Writing C language well, beautiful macro definition is very important. Using macro definition can prevent errors, improve portability, readability, convenience and so on. Here are some macro definitions commonly used in mature software. 1. Prevent a header file from b ...

Added by HuggieBear on Fri, 04 Mar 2022 02:39:18 +0200

Explain custom types - structs

catalogue Structure foundation 1. Structure declaration 2. Self reference of structure 3. Definition and initialization of structure variables 4. Structure member access (. And - > use) Structure memory alignment Modify the default number of alignments Baidu interview questions Structure foundation A structure is a collectio ...

Added by 9902468 on Fri, 04 Mar 2022 01:18:07 +0200