题面
Write the function strend(s,t)
, which returns if the string occurs at the end of the string , and zero otherwise.
Function prototype:
int strend(const char *s,const char *t);
/*
Precondition:
s points to a string,t points to a string.
Postcondition:
returns 1 if the string t occurs at the end of the
string s, and zero otherwise
*/
Constants
样例
输入
abcd cd
输出
1
输入
abcde ab
输出
0