Branch statement, loop

Branch statements and loops 1.bool type bool has only true and false; In C language, there are tens of millions of true (non-0) and only one false (0) 1.1 several bool types int a = 0;//false char ch = '0';//true char ch2 = '\0';//false null character char ch3 = 0;//false int *ptr = NULL;//false null macro is defined as 0 in C 1.2 re ...

Posted by jameslloyd on Sat, 05 Mar 2022 05:09:52 +0100

Parameter Stack for Function C alls (Detailed)

Preface In earlier learning, we learned that when a function passes a value to call a parameter, it uses a parameter. A parameter is a temporary copy of an argument, and changes to the parameter do not affect the values in the argument. Pass-by and Address Calls 👉 Click on me Today let's take a look at the argument stack of functio ...

Posted by saad|_d3vil on Sat, 05 Mar 2022 01:19:36 +0100

7-2 Huffman coding and decoding (25 points) (c language)

@Sparks 2022-03-05 Data structure experiment of gxust subject Write a Huffman coding and decoding program. Each word frequency is coded according to the order of Huffman's word frequency, and each word frequency is given from Huffman's word frequency to Huffman's word frequency. In order to ensure the uniqueness of the constructed Hu ...

Posted by SouThPaw09 on Fri, 04 Mar 2022 23:56:37 +0100

Exercise 6-7 simple calculator (super detailed! Structured programming step analysis) (20 points)

Exercise 6-7 simple calculator (20 points) Simulate the operation of a simple arithmetic unit. Assuming that the calculator can only perform addition, subtraction, multiplication and division, and the operands and results are integers, the four operators have the same priority and are calculated from left to right. Input format: Input gives ...

Posted by MikeSpider on Fri, 04 Mar 2022 23:49:14 +0100

Solution to 45 A-E questions of Niuke monthly competition

preface link Niuke Xiaobai monthly race 45 Finish five questions for the first time hh Try to write a solution The codes are directly copy the game time codes, which may be messy I'll try to write notes hh If you have any questions, please point them out hh A This problem is difficult to read... If n > = x Then you can jump horizont ...

Posted by jameslynns on Fri, 04 Mar 2022 22:52:21 +0100

c language learning notes (continuously updated)

One c file can only have one main function; There can be more than one in a project c documents. 1. Data type charCharacter data typeshortShort intintegerlongLong integerlong longLonger integerfloatSingle-precision floating-point doubleDouble precision floating point number View data type bytes Unit in computer: Bit - bit byte - byte = 8bi ...

Posted by sgt.wolfgang on Fri, 04 Mar 2022 20:35:08 +0100

Standard c library: fputc, fgetc, feof

1,Understand the usage of standard c library fopen (click to jump) 2. fputc writes a character to the file #include <stdio.h> int main() { FILE *fp; fp = fopen("./test.txt","w+"); //int fputc(int c, FILE *stream); fputc('a',fp); fclose(fp); return 0; } 3. fputc writes a string to a ...

Posted by kpulatsu on Fri, 04 Mar 2022 20:31:51 +0100

6. S32K14X learning notes S32K14X-ADC learning notes

S32K14X-ADC learning notes S32K14x includes two 12 bit ADC modules: ADC0 and ADC1; The S32K11x only contains a 12 bit ADC module: ADC0. 1. Number of ADC channels Each ADC supports up to 32 external analog input channels, but the exact ADC channel number appearing on the device is different from the software package shown in the table ...

Posted by thebusinesslad on Fri, 04 Mar 2022 19:52:26 +0100

Macro definition details

Macro defined Dark Magic - macro rookie takeoff manual Macro definition plays an important role in the development of C system. Needless to say, in order to compile, optimize and facilitate, as well as cross platform capabilities, macros are widely used. It can be said that it will be difficult for the underlying development to le ...

Posted by abgoosht on Fri, 04 Mar 2022 18:54:18 +0100

orm framework mybatis plus (Spring boot + Gradle installation and introduction) [2022]

preface The reason for writing this article is that because the software version iterates too fast, many tutorials on the Internet are no longer appropriate, and many commands don't quite understand their meaning. Official course Portal My version information java 17.0.1 (later modified to 8, if there is any difference, it will be noted in ...

Posted by dannymm on Fri, 04 Mar 2022 18:11:34 +0100