1. const 修饰的常变量 例如//const int num=8;则输出num必为8,此时num常变量
2.
#define defined identifier constant-#define MAX 10 then MAX is the constant 10
#define MAX 10
#include<stdio.h>
int main()
{
int arr[MAX] = { 0 };
printf("%d\n",MAX);
return 0;
}
3.枚举常量 :enum
4. 字符串:由双引号引起的一串字符称为字符串。“”为空字符串
5.#include<stdio.h>
#include<string.h>
int main()
{
printf("%d\n",strlen("chen"));
return 0;
}
6.
-
ASCII code example:'a'——97,'A'——65. \0 represents the end of the string
-
strllen is similar to sizeof, meaning string length, character size
-
Learn to use \ to prevent symbols from becoming other meanings