Making decrypt function
#include<stdio.h>
void decrypt(char *c){
char *ptr = c;
while(*ptr!='\0'){
*ptr = *ptr - 1;
ptr++;
}
}
int main(){
char c[] = "Tvojm!Lvnbs";
decrypt(c);
printf("Decrypted string is: %s", c);
return 0;
}
#include<stdio.h>
void decrypt(char *c){
char *ptr = c;
while(*ptr!='\0'){
*ptr = *ptr - 1;
ptr++;
}
}
int main(){
char c[] = "Tvojm!Lvnbs";
decrypt(c);
printf("Decrypted string is: %s", c);
return 0;
}
Comments
Post a Comment