摘要: 利用标准库函数strncpy(),可以将一字符串的一部分拷贝到另一个字符串中。strncpy()函数有3个参数:第一个参数是目录字符串;第二个参 数是源字符串;第三个参数是一个整数,代表要从源字符串拷贝到目标字符串中的字符数。以下是一个用strncpy()函数拷贝字符串的一部分的例子:#include <stdio.h>#include <string.h>void main (void){ char * source_str = "THIS IS THE SOURCE STRING" ; char dest_strl[40]= {0}, dest_ 阅读全文
posted @ 2013-04-18 22:43 煮人为乐 阅读(529) 评论(0) 推荐(0) 编辑
摘要: What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 9040Accepted Submission(s): 2832Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian 阅读全文
posted @ 2013-04-18 09:36 煮人为乐 阅读(429) 评论(0) 推荐(0) 编辑