#include
main()
{
void my_print(char *string );
void my_print(char *string );
char string[]="hello world ";
my_print(string);
my_print1(string);
}
void my_print(char *string)
{
printf("The string is %s\n",string);
}
void my_print1(char *string)
{
char *string1;
int size ,i;
size = strlen(string);
string1=(char *)malloc(size +1);
for(i=0;i<SIZE;I++)
{
string1[size-i]=string;
}
string1[size + 1]='\0';
printf("The string printed backward is %s\n",string1);
}
比如用以上例子来看string1【size-i】的值
|