建立一个二维字符数组,保存下面四句话,
Rain is falling all around,
It falls on field and tree,
It rains on the umbrella here,
And on the ships at sea.
将其倒序输出:“.aes ta…………”
建立一个二维字符数组,保存下面四句话,
Rain is falling all around,
It falls on field and tree,
It rains on the umbrella here,
And on the ships at sea.
将其倒序输出:“.aes ta…………”
#include<stdio.h>
#include<string.h>
int main() {
int i,j;
char a[4][100]= {"Rain is falling all around,",
"It falls on field and tree,",
"It rains on the umbrella here,",
"And on the ships at sea."
};
for(i=3;i>=0;i--){
for(j=strlen(a[i])-1;j>=0;j--){
printf("%c",a[i][j]);
}
printf("\n");
}
return 0;
}