Structures and Pointers – Strings – Problem #6
IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive
Difficulty: medium
Problem Statement
Input two strings s and t from the user. Assume that the strings do not contain blank or any whitespace character. Write a function that finds if s is a palindrome of t, i.e., whether the reverse of s is equal to t. If it is a palindrome, return 1; otherwise, return 0. The parameters of the function contain only pointers to characters (not arrays): int ispalindrome(char *s, char *t) Do not use any string library functions. In the main function read two strings. Call the above function and print its output.