leetcode刷题-c语言如何在函数中返回字符数组

题目: 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 “”。 代码: char* longestCommonPrefix(char** strs, int strsSize) { int n=strlen(strs[0]); static char a[n]; int i; int j; for(
相关文章
相关标签/搜索