printf("nn[Extension Goal]n");
   b = strtok(str, " ");
   for (int i = 0; b != NULL;i++) {
      strcpy(a[i], b);
      b = strtok(NULL, " ,.");
   }
   int c = wordCnt + 1;
   for (int i = 0; i<c; i++) {
      int count = 1;
      for (int j = i+1; j<c; j++)
         if (strcmp(a[i],a[j])==0) {
            count += 1;
         }
         printf("%s : %dn", a[i], count);

wordCnt+1은 단어 개수를 의미
str는 입력받을 문자열을 의미(실행할때마다 넣는 문자열에 따라 달라짐)
근데 이 코드를 실행했을 때 str 에 p g a g u 넣으면
p : 1
g : 2
a : 1
g : 1
u : 1
이렇게 출력돼서
뒤에 있는 g를 없애서
p : 1
g : 2
a : 1
u : 1 이렇게 출력하고싶음

Program program program일때
Program : 3 이렇게만 나오게