- 博客(3)
- 收藏
- 关注
原创 初学C语言1.3
1.字符串 #define _crt_secure_no_warnings 1 #include <stdio.h> #include <string.h> int main() { char arr[]="abc"; /*c语言中定义字符串通过数组,而不能使用字符串类型string*/ char arr1[]={'a','b','c',0}; /*字符串内容里面含有一个结束标志符0,'\0'*/ printf("%s\n",arr); printf("%s\n",arr1);
2021-07-26 19:15:16 87
原创 2021-07-10
常量的4种定义方式: 1.比如说数字1,2,3,确定性的值属性,常量。 2.用"const"修饰的变量,“const”具有常属性,修饰完的变量称为常变量。 3.“#define”-标识符常量 4.“enum”-枚举常量 枚举常量:能够一一例举出来的常量,比如说性别:男/女 ...
2021-07-10 09:36:50 46
原创 第一节:基础1.0
#include <stdio.h> /*声明在该地方插入stdio这个头文件*/ int main() /*主函数*/ { int a = 10; /*定义一个整形a,赋值为10*/ printf("%d\n", a); /*printf-打印函数*/ return 0; } #include <stdio.h> int main() { printf("%d\n", siz...
2021-07-09 10:52:17 60
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人