- 博客(4)
- 收藏
- 关注
原创 C语言关于字符串逆序输出---面试
面试华为硬件---芯片测试时让当场写了字符串逆序输出函数(C语言); 经调试可运行程序如下(运行环境VS2015): #include #include void func(char*, char*, int); int main() { //char* str="djkdhjsdf";//can't char str[] = "abcdfhgjgd";//不能用常量指针 cha
2015-09-17 07:48:39
2086
原创 C语言指针学习(-)
首先理解几个概念: 1、指针常量、指针变量。 关键:const 关键字的含义。 (1)指针常量:指针不可改变; 定义:int * const p//p值一旦初始化,不可改变; 以下是在VS2015中编译: #include "stdio.h" int main() { int arr[] = { 1,2,3,4,5 }; int * const p = arr;
2015-08-21 20:02:18
724
原创 VS2015 scanf 函数报错 error C4996: 'scanf'
错误提示:error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 具体如下,这是一个计算输入字符
2015-08-21 00:18:00
43151
6
原创 C语言主函数返回值问题:return type of 'main' is not 'int' [-Wmain]
当c语言main函数,返回值是void时,有提醒:return type of 'main' is not 'int' [-Wmain]
2015-08-20 00:48:50
18920
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人