码迷,mamicode.com
首页 >  
搜索关键字:gets    ( 3597个结果
HDU 5154 Harry and Magical Computer 拓扑排序
水题不解释 拓扑排序判断有无环 Description In reward of being yearly outstanding magic student, Harry gets a magical computer. When the computer begins to deal with a process, it will work until t...
分类:编程语言   时间:2015-03-04 21:07:48    阅读次数:144
hdu 1026 Ignatius and the Princess I 广搜+优先队列+记录路径
Problem Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To make the problem simply, we assume the labyrinth is a...
分类:其他好文   时间:2015-03-04 11:12:13    阅读次数:201
ACM457现在给出了一个只包含大小写字母的字符串,不含空格和换行,要求把其中的大写换成小写,小写换成大写,然后输出互换后的字符串。输入 第一行只有一个整数m(m<=10),表示测试数据组数。
#include #include int main() {     int n;     int i,j;     char a[102];     scanf("%d",&n);     getchar();         while(n--)         {             gets(a);             j=strlen(a);      ...
分类:其他好文   时间:2015-03-03 20:45:34    阅读次数:335
3801. String LD
Description Stringld (left delete) is a function that gets a string and deletes its leftmost character (for instance Stringld("acm") returns "cm").Yo....
分类:其他好文   时间:2015-03-02 22:22:33    阅读次数:186
PAT:1029. 旧键盘(20) AC
#include#includebool HARSH[256]={false}; //标记字符,初始化都未输出过int main(){ char str1[100],str2[100],tmp[100]; gets(str1); gets(str2); int len1=strle...
分类:其他好文   时间:2015-03-02 20:50:54    阅读次数:183
strcpy_s与strcpy的比較
strcpy_s和strcpy()函数的功能差点儿是一样的。strcpy函数,就象gets函数一样,它没有方法来保证有效的缓冲区尺寸,所以它仅仅能假定缓冲足够大来容纳要拷贝的字符串。在程序执行时,这将导致不可预料的行为。用strcpy_s就能够避免这些不可预料的行为。这个函数用两个參数、三个參数都能...
分类:其他好文   时间:2015-02-28 20:08:55    阅读次数:179
strcpy_s与strcpy的比較
strcpy_s和strcpy()函数的功能差点儿是一样的。strcpy函数,就象gets函数一样,它没有方法来保证有效的缓冲区尺寸,所以它仅仅能假定缓冲足够大来容纳要拷贝的字符串。在程序执行时,这将导致不可预料的行为。用strcpy_s就能够避免这些不可预料的行为。这个函数用两个參数、三个參数都能...
分类:其他好文   时间:2015-02-25 22:18:18    阅读次数:143
hdu2955---Robberies(概率做01背包)
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 to w...
分类:其他好文   时间:2015-02-24 15:10:58    阅读次数:196
Ruby版的猜数字游戏
puts?"Please?input?Number1:?" #提示输入第一个数 number1=gets #保存第一个数 puts?"Please?input?an?operator(+,-,*,/):?" op=gets puts?"Please?input?Number2:?" number2=gets cas...
分类:其他好文   时间:2015-02-24 00:51:18    阅读次数:239
gets和fgets
fgets从指定的文件中读一行字符到调用者提供的缓冲区中,gets从标准输入读一行字符到调用者提供的缓冲区中。 char *fgets(char *s, int size, FILE *stream); char *gets(char *s); 返回值:成功时s指向哪返回的指针就指向哪...
分类:其他好文   时间:2015-02-23 23:38:26    阅读次数:201
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!