mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
13 lines
215 B
C
13 lines
215 B
C
int max_len(char *s[], int n) {
|
|
int max_len = 0;
|
|
|
|
for (int i = 0; i < n; i++) {
|
|
int len = strlen(s[i]);
|
|
if (len > max_len) {
|
|
max_len = len;
|
|
}
|
|
}
|
|
|
|
return max_len;
|
|
}
|