-
What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s ("InterviewMania");
string::reverse_iterator Rev;
for (Rev = s.rbegin(); Rev < s.rend(); Rev++ )
cout << *Rev;
return 0;
}
-
- InterviewMania
- 14
- ainaMweivretnI
- Compilation Error
- None of these
Correct Option: C
‘rbegin’ is used to reverse the given the string.