Reversing an array In place

后端 未结 11 937
温柔的废话
温柔的废话 2020-12-21 04:20

Okay so I\'ve tried to print and Array and then reverse is using another array But I\'m trying to create a For Loop that will take an array and reverse all of the elements i

11条回答
  •  渐次进展
    2020-12-21 05:18

    #include
    #include
    #define max 25
    int main()
    { 
      char arr[max]="0123456789";
      strrev(arr);
      atoi(arr);
    
      return 0;
    }
    //you can also use built in functions such as strrev(); string reverse atoi just 
    //changes string into integer
    

提交回复
热议问题