您的位置:首页 > 其它

传递 二维 字符数组

2010-05-06 18:25 176 查看
或者:

#include <stdio.h>
int myprint(char str[][20],int len);
int main(){
int len=3;
char str[][20]={
"this is the test1",
"this is the test2",
"this is the test3",
};
myprint(str,len);
return 0;
}

int myprint(char (*str)[20],int len)
{
int i;
for(i=0;i<len;i++)
printf("%s/n", str[i]);
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: