1、gets和fgets的区别
char *gets(char *s);
gets() reads a line from stdin into the buffer pointed to by s untileither a terminating newline or EOF, which it replaces with '\0'.
Nocheck for buffer overrun is performed (see BUGS below).
char *fgets(char *s, int size, FILE *stream);
fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF or a newline. If a newline is read, it is stored into the buffer. A '\0' is stored after the last character
in the buffer.
2、运行时改变程序名称
memset(argv[0],0,strlen(argv[0])); strncpy(argv[0],"NewName",7);然后ps可以发现程序名称改变了
3、print从右到左运算输出
#include <stdio.h>
int main(void)
{
int a = 10, b = 20, c = 30;
printf( "\n %d..%d..%d\n", a+b+c,(b=b*2),(c=c*3) );
}
140..40..90
分享到:
相关推荐
包含100个经典c语言小程序,适合初学者入门研究学习,对C语言进行了一个全面而综合的回顾,有利于巩固提高编程能力
C语言应用的几个技巧C语言应用的几个技巧C语言应用的几个技巧C语言应用的几个技巧C语言应用的几个技巧C语言应用的几个技巧
猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题c语言猴子吃桃问题...
C语言几个实例 flash格式 有根据分数划分等级 等等5个
220个 c语言 几个大工程 综合CAD系统 功能强大的文本编辑器 图书管理系统 进销存管理系统
几个小游戏的C语言开发 几个小游戏的C语言开发几个小游戏的C语言开发
关于C语言教学几个问题的探讨.pdf
-c语言几个恶搞的小程序,供初学者娱乐.rar
C语言几个程序代码:用c/c++编程的几个小程序
c语言考研复试 面试常见问题集合
C语言解决三壶问题
C语言资源分配问题代码,算法设计与分析课程中的
C语言常见问题集 C语言常见问题集 C语言常见问题集 C语言常见问题集
c语言495个问题供参考
C语言图的着色问题回溯法,用的是排列树的框架,里面的代码可以直接运行。
贪心算法背包问题c语言实现贪心算法背包问题c语言实现贪心算法背包问题c语言实现贪心算法背包问题c语言实现贪心算法背包问题c语言实现贪心算法背包问题c语言实现贪心算法背包问题c语言实现贪心算法背包问题c语言实现...
C语言中几个模糊问题的讨论.pdf
有学生信息管理系统,推箱子游戏,通讯管理系统,学生档案管理系统,成绩管理系统C语言源代码。
贪心算法 背包问题 c语言 绝对无误 运行成功