fork(1) download
  1. #include <stdio.h>
  2.  
  3. void InverterString(char *str1){
  4. char aux[strlen(str1)];
  5.  
  6. for (int c=0; c<5; c++) aux[c] = str1[4 - c];
  7.  
  8. printf("A string1 invertida fica: %s", aux);
  9. }
  10.  
  11. int main(void) {
  12. InverterString("abcde");
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
A string1 invertida fica: edcba