Frage im Vorstellungsgespräch bei Coditas

Write a Program to reverse a string.

Antwort im Vorstellungsgespräch

Anonym

22. Feb. 2020

#include using namespace std; // Function to reverse a string void reverse(string str) { for (int i=str.length()-1; i>=0; i--) cout << str[i]; } // Driver code int main(void) { string s = "GeeksforGeeks"; reverse(s); return (0); }

Frage im Vorstellungsgespräch bei Coditas: Write a Program to reverse a string. | Glassdoor