Program for array of string and the strrev string function
#include<iostream>
#include<cstring>
using namespace std;
const int str=3;
const int max=100;
int main()
{
	char names[3][10]={"amar","smith","naman"};
	cout<<"reverse of string is :\n";
	for(int i=0;i<str;i++)
	{
                cout<<strrev(names[i])<<"\n";
	}return 0;
}
output:
reverse of string is :
rama
htims
naman
Comments
Post a Comment