- 博客(5)
- 收藏
- 关注
原创 第六课笔记 常量
//#define _CRT_SECURE_NO_WARNINGS////常量//#include<stdio.h>//#define MAX 10000//int main()//{// //字面常量// /*3.4;// 5;// "s";// "asdasdas";*///// //const修饰的常变量// //const int num =10;//num是常变量(本质是变量)const是num具有常属性--不能被改变...
2021-10-17 08:00:55
84
1
原创 第五课笔记
#include<stdio.h>int g_val = 2021;//全局变量//全局变量的作用域:整个工程int main(){ //作用域 : 变量在哪里使用哪里是它的作用域 //局部变量的作用域:就是变量所在的局部范围 printf("1:%d\n", g_val); printf("hello\n"); { int a = 10; printf("%d\n", a);//局部变量 p...
2021-10-17 07:59:32
96
原创 第三课c语言
#include<stdio.h>//int main()//{// //创建的一个变量// //类型 变量的名字=数字; 推荐// //类型 变量的名字; 不推荐//// int age= 20;// double weight = 75.3;//// age = age + 1;// weight = weight - 10;// printf("%d\n", age);// printf("%lf\n", ...
2021-10-10 10:24:08
80
原创 第二个c程序+笔记
#include<stdio.h>int main(){ //把字符a放入ch中(ch可以随便更改名字) char叫字符类型 char ch = 'a'; printf("%c\n",ch); //sizeof计算大小 printf("%d", sizeof(char)); return 0 ;}tips:数据类型char 字符数据类型 1short 短整型 2int 整型 4long 长整型 4l...
2021-10-07 21:07:49
125
原创 第一个c程序+笔记
#include<studio.h>int main(){ printf("比特\n") ; return0;}//main——主函数 (代码执行入口)//{}内叫函数体//int——函数的返回类型 (此处即返回return0)整型(整数)//printf——库函数:用以屏幕上打印信息 使用:需得说明,打声招呼——引用头文件 studio.h//#include<studio.h>——包含头文件//运行的快捷键ctrl...
2021-10-06 11:12:23
107
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅