单点时限: 2.0 sec
内存限制: 512 MB
Write the function strend(s,t)
, which returns $1$ if the string $t$ occurs at the end of the string $s$, 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
*/
abcd cd
1
abcde ab
0