#include<stdio.h>
#include<string.h>
#include<conio.h>
char *alphabetic (const char *s)
{
char *a=(void *)0;
int len,i=0,j=0;
len=strlen(s);
for(i=0;i<len;i++)
{
if((s[i]>=65))
{
if(s[i]<=90)
{
a[j]=s[i];
j++;
}
}
else if((s[i]>=97))
{
if((s[i]<=122))
{
a[j]=s[i];
j++;
}
}
}
return (char *)a;
}
int main (void)
{
char *a, *b, *c;
a = alphabetic ("Ready... aim... fire!");
printf ("%s\n", a);
free(a);
getch();
return 0;
}
the output is:
Readyaimfire
I don't know what is wrong,
when i try to run it,
it doesn't respond at all.