C
c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
int main(){
char str[50];
char str2[50];
int i;
printf("enter name:");
scanf("%[^\n]s");
for(i=0;i<strlen(str);i++){
if(isalnum(str[i]))
{
strcpy(str,str2);
}
printf("%s", str2);
}
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run