I already posted what you wanted in your other thread. But here it is again:
Code:
#include <stdio.h>
#include <ctype.h>
int main(void)
{
const char text[]="Hello, it is me, how are you. This is a test and only a tes bye!";
char newtext[sizeof(text)] = {0};
int i;
char ch;
i = 0;
while ((ch=text[i])!='\0')
{
ch = tolower(ch);
if(ch>='a' && ch<='z')
{
switch (ch)
{
case 'a': ch = 'l'; break;
case 'b': ch = 'j'; break;
case 'c': ch = 'g'; break;
case 'd': ch = 'w'; break;
case 'h': ch = 'f'; break;
default: ch = '*'; break;
}
if(isupper(text[i]))
ch = toupper(ch);
}
newtext[i++] = ch;
}
printf("%s\n",newtext);
return 0;
}
That should do what you want.