#include
#include
#include
int main()
{
char *s1, *s2 ;
s2 = (char*) malloc(sizeof(char)) ;
s1 = (char*) malloc(sizeof(char)) ;
printf("nPlease Enter A String: ");
gets(s1);
strcpy(s2, s1); // copy s1 into s2
strrev(s2); // reverse s2
if( strcmp(s1,s2) == 0 ) // compare s1 and s2 if same there are PALENDROM
printf("The Srting Is Palenrom...nn");
else
printf("The string Is't Palenrom...nn");
return 0;
}اولا
ممكن احد يتكرم ويشرحلي هالكود او يشرح فكرته بالتفصيل لاني حاولت افهمه ماقدرت على فكره انا حصلته فالمنتدى
وش معني هذا
s2 = (char*) malloc(sizeof(char)) ;
s1 = (char*) malloc(sizeof(char)) ;
وليش استخدم s1,s2
وثانيا
ولو اني كلفت عليكم ما احصل عندكم شرح مفصل عن الarray
وجزاكم الله خير