saving . . . saved string palindrome has been deleted. string palindrome has been hidden .
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 16-04-23, 9:48 p.m. Krishnasain

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.
24-07-23, 10:44 a.m. Spokenuser


Log-in to answer to this question.