码农教程 - 一技在手,衣食无忧!
Home
HTML/CSS
HTML
CSS
W3.CSS
Bootstrap
SASS
Bootstrap4
Bootstrap5
JavaScript
JavaScript
React
jQuery
Nodejs
VUE
TypeScript
Angular
Server
JAVA
PHP
C
C++
GO
Django
DB
SQL
MYSQL
PostgreSql
MongoDb
Data Analysis
Python
R
Mobile
Kotlin
XML
XML
ASP.NET
C#
ASP
Dev Tools
GIT
Website
How To
AWS
Cybersecurity
AI
AI
Gen AI
Data Science
目录
C Tutorial
C HOME
C Intro
C Get Started
C Syntax
C Output
C Output
New Lines
C Comments
C Variables
C Data Types
C Data Types
Type Conversion
C Constants
C Operators
C Booleans
C If...Else
C If...Else
C Short Hand If
C Switch
C While Loop
C For Loop
C Break/Continue
C Arrays
C Arrays
Multidimensional Arrays
C Strings
C Strings
Special Characters
String Functions
C User Input
C Memory Address
C Pointers
C Pointers
Pointers & Arrays
C Functions
C Functions
C Function Parameters
C Function Declaration
C Recursion
C Math Functions
C Files
C Create Files
C Write To Files
C Read Files
C Structures
C Structures
C Enums
C Enums
C Examples
C Examples
C Exercises
C Quiz
C Compiler
C
Examples
❮ Previous
Next ❯
Syntax
Create a simple "Hello World" program
Syntax Explained
Output/Print
Use printf to print text
Using many printf functions
Insert a new line with \n
Output Explained
Comments
Single-line comment before a line of code
Single-line comment at the end of a line of code
Multi-line comment
Comments Explained
Variables
Create an integer variable and print it
Combine both text and a variable
Change/overwrite variable values
Add a variable to another variable
Declare many variables of the same type with a comma-separated list
Assign the same value to multiple variables of the same type
Real-life variables example
Variables Explained
Data Types and Format Specifiers
A demonstration of different data types and format specifiers
Set decimal precision for floating point values
Implicit/automatically conversion - convert an int to a float
Explicit/manually conversion - convert an int to a float
Data Types and Format Specifiers Explained
Constants
Create a constant variable
Good practice - use uppercase letters when declaring constants
Constants Explained
Operators
Addition operator
Subtraction operator
Division operator
Modulus operator
Increment operator
Decrement operator
Assignment operator
Addition assignment operator
Comparison operator
Logical operators
Using the "sizeof" operator to get the memory size of different variables
Operators Explained
Booleans
Create boolean variables
Compare two values
Compare two variables
Compare two boolean variables
Real-life example
Variables Explained
If...Else (Conditions)
The if statement
The else statement
The else if statement
Short hand if...else
If...Else Explained
Switch
The switch statement
The switch statement with a default keyword
Switch Explained
Loops
While loop
Do while loop
For loop
Nested loop
Break a loop
Continue a loop
Loops Explained
Arrays
Create and access an array
Change an array element
Loop through an array
Two-dimensional array
Change elements in a two-dimensional array
Loop through a two-dimensional array
Arrays Explained
Strings
Create a string
Another way to create a string
Access string characters
Change string characters
Loop through a string
Special characters in a string
Get the length of a string
Concatenate strings
Copy strings
Compare strings
Strings Explained
User Input
Input a number and print the result
Input a string and print the result
User Input Explained
Memory Address/References
Get the memory address of a variable
Memory Address Explained
Pointers
Create a pointer variable
Get the value of a variable with the dereference operator *
Access an array with pointers
Loop through an array using pointers
Pointers Explained
Functions
Create and call a function
Call a function multiple times
Function declaration and definition
Parameters and arguments
Multiple parameters
Pass arrays as function parameters
Return value
Return the sum of two parameters
Recursion (make a function call itself)
Use a math function to get the square root of a number
Functions Explained
Files
Create a file
Write to a file
Append/add content to a file
Read the first line of a file
Read all lines of a file
Good practice when reading files
Files Explained
Structures
Access a structure
Create multiple structure variables with different values
String in structure
Simpler Syntax (shorthand)
Copy structure values
Modify values
Real Life Example
Structures Explained
Enums
Create an enum variable and assign a value to it
Change the value of enum items
Change the value of a specific enum item
Enum in a switch statement
Enums Explained
❮ Previous
Next ❯
纠错反馈
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!
标注
直接在页面拖动鼠标来标注反馈区域!
下一步
反馈内容
联系方式(邮箱)
返回
提交