Problem1939--查找子串

1939: 查找子串

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 0  Solved: 0
[Submit] [Status] [Web Board] [Creator:]

Description

本题要求实现一个字符串查找的简单函数。 函数接口定义: char *search( char *s, char *t ); 函数search在字符串s中查找子串t,返回子串t在s中的首地址。若未找到,则返回NULL。 裁判测试程序样例: #include #define MAXS 30 char *search(char *s, char *t); void ReadString( char s[] );

Input

字符串s,子串t

Output

函数search在字符串s中查找子串t,返回子串t在s中的首地址。若未找到,则返回NULL

Sample Input Copy

The C Programming Language
ram

Sample Output Copy

10

Source/Category

237