Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- #include<ctype.h>
- int main() {
- char string[60] = "";
- int arrASCII[255] = {0}
- for(int i = 0; i < 255; i++) {
- arrASCII[i] = 0;
- } //tao ta mang 255 so 0;
- printf("Enter string: ");
- gets(string);
- strlwr(string);//viet thuong het 1 chuoi
- int length = strlen(string);
- for(int i=0; i < length; i++) {
- arrASCI[string[i]]++;
- }
- printf("Found characters: \n");
- for(int i= 0; i < 255; i++) {
- if(arrASCI[i] ==1) {
- printf("%c\t", i);
- }
- }
- free(string);
- free(arrASCII);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement