encypting a string

 #include <stdio.h>

 void encrypt(char * c)
 {
     char *ptr=c;
while(*ptr!='\0')
{
    *ptr=*ptr+1;
ptr++;
}
 }

int main(){

    char str[]="Anchal";

encrypt(str);
printf("The encrypte string is:%s",str);

 return 0;
}

Comments

Popular posts from this blog

snake game Version-2 (using random number)

allocating dynamic memory using calloc

store a table in dynamic array and then change the size of array dynamically to store more numbers