string reversal in gnu c++ | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

string reversal in gnu c++

in turbo we had strrev function for reversal of a string. bt this functn is not defined in c++ gnu...is there any other fnctn for the same or we need to use the loop method only????

11th Jul 2018, 8:14 AM
Tulika
Tulika - avatar
1 Antwort
+ 3
Modern or c-strings? Modern strings can be reversed by the function std::reverse, which is located in the header <algorithm>. For older c-strings you will have to make your own function.
11th Jul 2018, 8:26 AM
Shadow
Shadow - avatar