## 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 functi ...

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