码迷,mamicode.com
首页 >  
搜索关键字:gets    ( 3597个结果
hdu 5280 Senior's Array
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5280 Senior's ArrayDescriptionOne day, Xuejiejie gets an array $A$. Among all non-empty intervals of $A$...
分类:其他好文   时间:2015-07-12 23:12:21    阅读次数:151
C语言 gets()和scanf()函数的区别
scanf( )函数和gets( )函数都可用于输入字符串,但在功能上有区别。若想从键盘上输入字符串"hi hello",则应该使用__gets__函数。gets可以接收空格;而scanf遇到空格、回车和Tab键都会认为输入结束,所有它不能接收空格。char string[15]; gets(str...
分类:编程语言   时间:2015-07-12 15:34:26    阅读次数:149
scanf() & gets() & fgets() 读取字符串的区别
scanf()和gets()读取字符串的区别主要的差别在于它们如何决定字符串何时结束scanf()更基于获取单词(getword)而不是获取字符串(getstring);gets()会读取所有的字符,直到遇见第一个换行符为止。scanf()使用两种方法决定输入结束。如果使用%s格式,字符串读到(但不包括..
分类:其他好文   时间:2015-07-11 18:43:09    阅读次数:217
poj2886--Who Gets the Most Candies?(线段树+反素数)
题目链接点击打开链接 题目大意:给出n个人的姓名和手里的一个号码,n个人排成一圈,号码有正有负,代表着正向还是反向移动k个位置,比赛从第k个人开始,把被选到的人踢出,问按踢出的顺序中因子数最多的是谁? 建立线段树,把n个人被踢的顺序找到,然后求出n个人中因子数最多的(最小的数)是谁,这里要用到反素数,详看链接点击打开链接 #include #include #include using...
分类:其他好文   时间:2015-07-11 12:15:23    阅读次数:105
从字符数组中删除特定字符
#include int main() { char str[100],c; int j,k; printf("please input a string:"); gets(str); printf("\nEnter a character:"); c=getchar(); for(j=k=0;str[j]!='\0';j++) if(str[j]!=c) str[k++]...
分类:编程语言   时间:2015-07-09 19:50:28    阅读次数:128
[LeetCode] Wildcard Matching
Well, so many people has tried to solve this problem using DP. And almost all of them get TLE (if you see a DP solution that gets accepted, please let...
分类:其他好文   时间:2015-07-06 13:46:30    阅读次数:136
字符串逆序输出
//字符串逆序输出 #include #include int main() { char str[50]; char temp; int i,length=0; gets(str); length = strlen(str); for(i = 0,length--;i { temp = str[i]; str[i] = str[length]; str[length...
分类:其他好文   时间:2015-07-02 19:34:21    阅读次数:96
oracle SQL语句
oracle SQL语句执行的监控脚本![@more@]--查找bad sql的方法: select * from (select buffer_gets, sql_text from v$sqlarea where buffer_gets >500000 order by buffer_g...
分类:数据库   时间:2015-07-01 23:38:40    阅读次数:190
One good turn deserves another
原文 I was having dinner at a restaurant when Tony Steele came in. Tony worked in a lawyer‘s office years ago, but he is now working at a bank. He gets a good salary, but he always borrows money fr...
分类:其他好文   时间:2015-07-01 14:21:57    阅读次数:130
12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个!
? 12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个! 1.gets()函数 问:请找出下面代码里的问题: #include<stdio.h> int main(void) { ??? char buff[10]; ??? memset(buf...
分类:编程语言   时间:2015-06-30 13:18:57    阅读次数:150
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!