发布网友 发布时间:2022-05-01 13:23
共4个回答
热心网友 时间:2023-10-14 21:26
#include <string>热心网友 时间:2023-10-14 21:26
#include <string>热心网友 时间:2023-10-14 21:27
#include <iostream>热心网友 时间:2023-10-14 21:27
1 #include<stdio.h> 2 int dlsplay1(char *string); 3 int dlsplay2(char *string); 4 int main() 5 { 6 char sting[]="embedded linux"; 7 dlsplay1(string); 8 dlsplay2(string); 9 } 10 int dlsplay1(char *string) 11 { 12 printf("the original string is %s /n",string); 13 } 14 int dlsplay2(char *string1) 15 { 16 char *string2; 17 int size,i; 18 size=strlen(string1); 19 string2=(char *)molloc(size +1); 20 for(i=0;i<size;i++) 21 string2[size-1-1]=string1[i]; 22 string2[size+1]=''; 23 printf("the string afterward is %s/n",string2); 24 } 25 }热心网友 时间:2023-10-14 21:26
#include <string>热心网友 时间:2023-10-14 21:26
#include <string>热心网友 时间:2023-10-14 21:27
#include <iostream>热心网友 时间:2023-10-14 21:27
1 #include<stdio.h> 2 int dlsplay1(char *string); 3 int dlsplay2(char *string); 4 int main() 5 { 6 char sting[]="embedded linux"; 7 dlsplay1(string); 8 dlsplay2(string); 9 } 10 int dlsplay1(char *string) 11 { 12 printf("the original string is %s /n",string); 13 } 14 int dlsplay2(char *string1) 15 { 16 char *string2; 17 int size,i; 18 size=strlen(string1); 19 string2=(char *)molloc(size +1); 20 for(i=0;i<size;i++) 21 string2[size-1-1]=string1[i]; 22 string2[size+1]=''; 23 printf("the string afterward is %s/n",string2); 24 } 25 }热心网友 时间:2023-10-14 21:26
#include <string>热心网友 时间:2023-10-14 21:26
#include <string>热心网友 时间:2023-10-14 21:27
#include <iostream>热心网友 时间:2023-10-14 21:27
1 #include<stdio.h> 2 int dlsplay1(char *string); 3 int dlsplay2(char *string); 4 int main() 5 { 6 char sting[]="embedded linux"; 7 dlsplay1(string); 8 dlsplay2(string); 9 } 10 int dlsplay1(char *string) 11 { 12 printf("the original string is %s /n",string); 13 } 14 int dlsplay2(char *string1) 15 { 16 char *string2; 17 int size,i; 18 size=strlen(string1); 19 string2=(char *)molloc(size +1); 20 for(i=0;i<size;i++) 21 string2[size-1-1]=string1[i]; 22 string2[size+1]=''; 23 printf("the string afterward is %s/n",string2); 24 } 25 }