string encrypter-decryptor

 #include <stdio.h>


void encrypter( char*c){

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

        *c=*c+1;

        c++;

        

    }

}

void decryptor(char *c){

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

        *c=*c-1;

        c++;

    }

}

int main() {

    // Write C code here

    char  str[] = "Come to this room";

    encrypter(str);

    printf("Encrypted msg is : %s\n",str);

    decryptor(str);

    printf("Decrypted msg is : %s",str);

    

    

    return 0;

}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings