~cpp #include <iostream> using namespace std; void main() { char spell[6] = "abced"; char reverse[6]; int i; for(i=0;i<5;i++){ reverse[4-i] = spell[i]; } reverse[5] = '\0'; cout << reverse << endl; }
~cpp #include <iostream> using namespace std; void main() { char spell[6] = "abced"; char reverse[6]; int i; for(i=0;i<5;i++){ reverse[4-i] = spell[i]; } reverse[5] = '\0'; cout << reverse << endl; }