- 博客(3)
- 收藏
- 关注
原创 结构和字符串
常用字符串处理函数 头文件 string.h 函数: size_t strlen (const char*) 获得字符串长度,不包括\0 char * strapr(char *) 转大写 char*str(wrlchar *) 转小写 char * strcpy (char * ,const char *)把第二个复制到第一中 数组的隐藏特性其地址是不能改的(常量特...
2018-11-23 20:08:43
145
原创 函数 内置函数 动态数组 字符
取随机数 srand(); int num = rand();//这样执行多次都是一个相同的数 如果每次都不同要每次取一个种子 所以一般与时间连用 #include<time.h> srand(time(NULL));//调用时间,NULL这里指默认时间 exit(0)//正常退出程序,非0就是不正常退出(闪退) system 管理员 system(“pause”);暂停 syst...
2018-11-17 10:36:16
616
原创 数组指针 函数
数组与指针 数组整体的地址和数组首元素的地址是一样的 数组名就是数组首元素地址 数组指针的递增与递减 例(num++或num+1) int i; int score[5] = { 1 , 2 , 3 , 4 , 5}; int * ptr_score; ptr_score = score; for(i = 0 ; i < 5 ; i++) { printf("%d\n", * ptr_sc...
2018-11-10 20:17:01
224
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人