i tried this code to read each character in text file and if the chracter =ا print @
else print the character
void
preprocess_file (FILE *fp)
{
char d;
for (;;)
{
d = getc (fp);
if (d == EOF)
break;
if (d =='ا')
printf ("@\n");
else
printf ("%c\n ", d);
}
}
int
main(int argc, char *argv [])
{
preprocess_file (stdin);
exit (0);
}
but the output file is showing strange result as following
ï
»
؟
ط
§
ظ
„
ظ
…
ط
¤
any help?