Check Whether Given Number is Palindrome or Not ????
#include<stdio.h> #include<string.h> int main() { int num,i,count=0; char str1[10],str2[10]; printf("nEnter a number:"); scanf("%d",&num); sprintf(str1,"%d",num); // Convert Number to String strcpy(str2,str1); // Copy String into Other strrev(str2); // Reverse 2nd Number count = strcmp(str1,str2); if(count==0) printf("%d is a prime number",num); else printf("%d is not a prime number",num); return 0; }