string palindrome
Title
Question
#include <iostream>
#include<iomanip>
#include<string.h>
using namespace std;
int main()
{
char s1[20],s2[20];
cout<<"Enter a string:\n";
cin>>setw(19)>>s1;
srtcpy(s2,s1);
strrev(s2);
if((strcmp(s1,s2))==0)
cout<<"string is palindrome\n";
else cout<<"string is not a palindrome\n";
return 0;
}
showing an error here
srtcpy(s2,s1);
strrev(s2);
C-and-Cpp Strings 02-03 min 20-30 sec
Answers:
Dear
strcpy() is the string function to copy one string to another, you have mentioned it as srtcpy, Kindly check and Update it in the Code. If still you are facing the error kindly revert it back.
Login to add comment