I need to place * on every lowercase letter, but my program blocks always. Although this seems like a simple problem I cant find simple solution. Please help.
#include <stdio.h>
void f(char *p)
{
int i = 0;
char c = '*';
while(p[i] != '\0')
{
if(p[i]> 96 && p[i] < 122 )
{
p[i] = c; # here program block
}
i++;
}
printf("%c",p);
}
int main(void)
{
f("tesT");
return 1;
}
I found some similar problems on internet but without success. :(