写一个函数,实现将tom is cat反向打印成 cat is tom。
来源:互联网 发布:仓库软件破解版 编辑:程序博客网 时间:2024/06/15 06:35
void reverse(char a[][20],int count)
{
char b[20] = {0};
for (int i = count -1;i >=0 ; i--) {//反向取出a中的字符串
strcpy (b, a[i]);//将字符串赋值给b
for (int j =0; j < 20; j ++) {
if (b[j] !='\0') {//打印字符串b
printf("%c",b[j]);
}
}
printf(" ");
}
}
int main(int argc,const char * argv[])
{
char a[3][20] = {"tom","is","cat"};
reverse(a,3);
return 0;
}
0 0
- 写一个函数,实现将tom is cat反向打印成 cat is tom。
- 写一个函数,实现将tom is cat反向打印成 cat is tom。
- Tom-Cat
- UI010---cat tom
- talking tom cat 如何实现的
- 配置Tom-cat使用帮助
- Tom
- Tom
- cat函数系统函数实现
- cat 函数
- cat
- cat
- cat
- cat
- cat
- cat
- cat
- cat
- UIView的clipsTobounds属性
- linux tomcat配置
- dedecms 如何制作google地图制作 xml地图 百度地图
- jQuery 遍历 - each() 方法
- C语言—指针与数组
- 写一个函数,实现将tom is cat反向打印成 cat is tom。
- HDU_4848_Wow! Such Conquering!(Floyd+DFS剪枝)
- 黑马程序员——GUI与网络编程
- HDU 4882 ZCC Loves Codefires(贪心水)
- hdu 4873 Java大数
- 宏定义
- 新人来报道
- C++STL之非变异算法
- 计算机视觉与图像处理、模式识别、机器学习学科之间的关系