// A C program whether the string is palindrome or not
#include<stdio.h>#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char a[100], b[100];
printf("Enter a string to check if it is a palindrome\n");
gets(a);
strcpy(b,a);
strrev(b);
if(strcmp(a,b) == 0)
printf("Entered string is a palindrome.\n");
else
printf("Entered string isn't a palindrome.\n");
getch();
}
Output:
// Smallest and Largest elements from One Dimensional Array using C program
// A C program to enter and display the name using string
// A C Program of Sum of Two Matrix
// A Program to calculate Sum, Product of all elements using array
Nhận xét
Đăng nhận xét