Learning C Language Part Three

Learning C Language Part Three

1. Common Input and Output Functions Understanding input and output functions is sufficient; being able to use one method is enough. Because input and output directly interact with the terminal, in actual development, there are basically no programs that directly interact with the terminal. 1.1 putchar()/getchar() putchar() Prototype: int putchar(int c); Function: Outputs a character … Read more

Learning C Language: Part Four

Learning C Language: Part Four

1. Branch Control Statements 1.2 switch..case Statement 1.2.1 Format switch(expression){ case constant_expression1: code_block1; break; case constant_expression2: code_block2; break; case constant_expressionn: code_blockn; break; default: other_branch; break;} 1.2.2 Notes 1. The expression is generally a variable, which can also be a variable expression, and the constant expressions after case represent all possible values of this variable; 2. … Read more

Examples of Control Statements in Linux Shell

Examples of Control Statements in Linux Shell

(Click the public account above to quickly follow) Author: Cheng Mo, www.cnblogs.com/chengmo/archive/2010/10/14/1851434.html If you have good articles to submit, please click → here for details The Linux shell has its own set of control statements, including conditional statements (if), loop statements (for, while), and selection statements (case). Below, I will introduce the usage of each … Read more

Fundamentals of C++ Programming Language

Fundamentals of C++ Programming Language

Learning Objectives: Fundamentals of C++ Programming Language Learning Content: Basic Syntax This article is aimed at beginners and introduces the basic usage of C++, including control statements, commonly used data structures from the standard library, etc., to help quickly get started with coding challenges. For example: Standard Output Control Statements Basic Data Structures Summary Standard … Read more