Making Encrypt function

 #include<stdio.h>

void encrypt(char *c){

    char *ptr = c;

    while(*ptr!='\0'){

        *ptr = *ptr + 1; 

        ptr++;

    }

}


int main(){

    char c[] = "Sunil Kumar";

    encrypt(c);

    printf("Encrypted string is: %s", c);

    return 0;

}

Comments

Popular posts from this blog

Snake game.c

Type declaration

Array with function