int a[22] = {0}; int b[22] = {0}; scanf("%s",a); int i = 0; while(a[i] != '\0') { if((a[i]>='A' && a[i]<='Z') || (a[i]>='a' && a[i]<='z')) b[i] = a[i]; i++; } printf("%s\n",b);