【鹏哥C语言】第一讲:C语言的常见概念
学vs2022
vscode - 编辑器,装插件搭建C/C++环境,上手成本高;
vs2022 - IDE,集成开发环境。
学C
- int:指返回时返回一个整数
1 | int main() |
*整个项目有且仅有一个main函数,即使有多个c文件;
*main 函数可以有参数,其参数有特殊意义;
- 单引号括起来的叫字符,双引号括起来的叫字符串。printf详情
1 | int main() |
#include <stdio.h>
std - standard 即c语言标准库
i - input
o - output
1 | int main() |
循环
1
2
3
4
5
6
7
8
9
10
11
12//打印可见字符
int main()
{
for (int i = 32;i < 127;i++)
{
printf("%c ", i);
if (i % 16 == 15) {
printf("\n");
}
}
return 0;
}字符串的结束标志为’\0‘
- Title: 【鹏哥C语言】第一讲:C语言的常见概念
- Author: Artificial-Fool
- Created at : 2024-12-20 15:20:16
- Updated at : 2024-12-22 20:24:41
- Link: https://space.bilibili.com/636023121/2024/12/20/PenggeC-note1/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments