当前位置:网站首页>标准C语言总结1
标准C语言总结1
2022-07-28 05:18:00 【c7473168】
一.头文件: 以.h结尾,里面存放的是辅助性代码,绝大多数都是函数的说明
#include 功能是导入头文件
#include <xxx.h>
<> 从系统指定路径查找头文件并导入
#include "xxx.h"
"" 先从当前的工作路径查找头文件,如果找不到再从系统指定路径查找并导入
main函数: 函数的调用者是操作系统,它的返回值是给了操作系统的,它的值能反应出程序是如何结束的,一般有三类:
正数 出现异常 (别人的错误)
0 一切正常
负数 出现错误 (自己的错误)
C语言的文件类型:
.c 源文件
.h 头文件
.h.gch 头文件的编译结果文件,它会被优先使用
.i 预处理文件
.s 汇编文件
.o 目标文件
.a 静态库文件
.so 共享库文件
分支语句
if(表达式) //单分支
{
//表达式为真(非零),则执行此处代码
}
else //双分支
{
//表达式为假(零),则执行此处代码
}
if(表达式1) //多分支
{
//表达式1为真,则执行此处代码
}
else if(表达式2)
{
//表达式2为真,则执行此处代码
}
else
{
//如果以上所有表达式都为假,则最后执行此处代码
}
1.自变运算符: ++/--
2.算数运算符:+ - * / %
3.关系运算符:> < >= <= == !=
4.逻辑运算符: && || !
5.三目运算符: a?b : c
各个运算符优先级按排列顺序
边栏推荐
- Mutual conversion between latex and word
- Advanced multithreading: the role and implementation principle of volatile
- 冶金物理化学复习 --- 化学反应动力学基础
- Pytorch uses maxpool to realize image expansion and corrosion
- 记录某某小卢的第一篇文章
- The difference between get and post
- Arrangement of main drawings of the latest 54 papers of eccv22
- Openjudge: judge whether the string is palindrome
- Openjudge: perpetual calendar
- Mybats foreach multi select query, index loop, and cancel the and/or tag
猜你喜欢

Advanced multi threading: the underlying principle of synchronized, the process of lock optimization and lock upgrade

GET与POST区别

Delete specific elements in order table OJ

RESNET structure comparison
![[idea plug-in artifact] teaches you how to set all attributes in an entity class with one click of idea](/img/d6/4e69480c5ad5040ee48941ca0fcb37.png)
[idea plug-in artifact] teaches you how to set all attributes in an entity class with one click of idea

visio如何精确控制图形的大小和位置及角度

蒸馏模型图

Leetcode 随即链表的深拷贝

Centos7 install MySQL 5.7

分支与循环语句
随机推荐
冶金物理化学复习 ---- 气固反应动力学
ByteBuffer. Position throws exception illegalargumentexception
链表中关于快慢指针的oj题
Advanced multithreading: Lock strategy
Solve the problem that Oracle cannot use more than 1000 in statements
冶金物理化学复习 --- 金属的电沉积,还原过程
openjudge:找第一个只出现一次的字符
Use of IO streams
Response < t > class
冶金物理化学复习 -- 金属电沉积过程中的阴极极化,超电势以及阳极和阳极过程
动态卷积的本质
Digital twin solutions inject new momentum into the construction of chemical parks
latex和word之间相互转换
Mutual conversion between latex and word
JVM篇 笔记3:类加载与字节码技术
Openjudge: campus accommodation reservation system
RESNET structure comparison
(黑马)MYSQL初级-高级笔记(博主懒狗)
Low illumination image data set
Database interview