1.gets()函数问:请找出下面代码里的问题:#includeint main(void){ char buff[10]; memset(buff,0,sizeof(buff)); gets(buff); printf("\n The buffer entered is [%s]\n",buff)...
分类:
编程语言 时间:
2015-06-30 12:11:57
阅读次数:
145
Well, life gets difficult pretty soon whenever the same operation on array is transferred to linked list.First, a quick recap of insertion sort:Start ...
分类:
其他好文 时间:
2015-06-29 23:52:10
阅读次数:
127
You are my brother时间限制:1000ms | 内存限制:65535KB难度:3描述Little A gets to know a new friend, Little B, recently. One day, they realize that they are family 5...
分类:
其他好文 时间:
2015-06-28 22:45:23
阅读次数:
167
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5154Harry and Magical ComputerDescriptionIn reward of being yearly outstanding magic student, Harry gets...
分类:
其他好文 时间:
2015-06-27 11:26:25
阅读次数:
150
#include #include #includeint main(){ char str[100]; int i; while(gets(str) != NULL) { if(str[0] == '#') break; f...
分类:
其他好文 时间:
2015-06-23 17:42:53
阅读次数:
107
表达式求值。 手动模拟吧。可以用站维护,这里我没用到栈来写。注意不能gets() 输入有换行。 还要用到高精度,套一个模板。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace st...
分类:
其他好文 时间:
2015-06-21 18:39:42
阅读次数:
157
Problem Description
The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided t...
分类:
其他好文 时间:
2015-06-20 17:11:21
阅读次数:
163
#include #include #includeint main(){ char str[260]; int len,i,sum; while(gets(str) != NULL && str[0] != '#') { sum=0; len=s...
分类:
其他好文 时间:
2015-06-20 13:06:50
阅读次数:
103
#include #include int main(){ char str[100]; while(gets(str) != NULL) { printf("%s\n",str); } return 0;}View Code
分类:
其他好文 时间:
2015-06-19 16:40:06
阅读次数:
104
功能:同样是获取字符串。区别:scanf 遇到空格/回车/Tab键认为输入结束, 但是空格/回车/Tab键仍会留在输入的缓冲区中。常见的是使用getchar(),处理scanf的后事;如果想要清除残余,可以使用fllush()清除缓存。gets 可以接收空格/回车/Tab键,回车结束输入...
分类:
其他好文 时间:
2015-06-17 13:18:00
阅读次数:
218