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