传递 二维 字符数组
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; } |
相关文章推荐
- 动态分配的二维字符数组 赋值时记得加‘\0’
- C下二维字符指针数组的输出
- 指针动态创建数组,二维指针处理字符数组,链表对象排序
- Unity将字符数组转换为字符串向Android传递消息
- 在一个类中编写一个方法,这个方法搜索一个字符数组中是否存在某个字符,如果存在,则返回这个字符在字符数组中第一次出现的位置(序号从0开始计算),否则,返回-1。要搜索的字符数组和字符都以参数形式传递传递
- 一道二级C题引发的思考-- c++函数传递指针的本质 与 字符串指针与字符数组的区别
- 对二维字符数组排序(2sort和1qsort)
- 关于数组指针,指针数组,双重数组,二维矩阵,字符串数组,双重字符指针的理解
- 二维字符数组与char** 关系
- sort对二维字符数组排序
- 二维字符数组与字符串数组的使用
- 对二维字符数组排序(2SORT和1QSORT)
- 【错误记录】二维数组初始化,以二级指针传递函数参数
- 1214 1159,二维字符数组sort排序
- 二维字符数组利用gets输入
- 使用qsort对二维字符数组排序疑难问题调试及解决过程
- [C语言]给一个二维字符数组赋值的问题
- C 语言 实现 字符串 分割 函数(返回"二维字符数组",及分割后的字符数组的长度)
- 二维字符数组与char** 关系
- 循环输入和输出二维字符数组