QUESTION-
INPUT A STRING ARRAY AND PASS THAT ARRAY TO FN AND APPLY STRING.H OPERATIONS
ANSWER-
#include<stdio.h>
#include<conio.h>
#include<string.h>
int pal(char[],int);
int main()
{
int i;
char s[5][50];
for(i=0;i<5;i++)
{
printf(“ENTER NAME %d: “,i+1);
gets(s[i]);
}
for(i=0;i<5;i++)
pal(s[i],50);
printf(“\n\n\t PROGRAMMING @ CODE STUDIO”);
getch();
}
int pal(char s1[],int a)
{
char s2[50];
int j;
strcpy(s2,s1);
strrev(s1);
printf(“\nReversed Name is :”);
puts(s1);
j=strcmp(s2,s1);
if(j==0)
printf(“\n\tSTRING IS PALINDROME.”);
else
printf(“\n\tSTRING IS NOT PALINDROME.”);
}
OUTPUT-