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;
}
#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
Post a Comment