Write a function that returns how many different not includi
Solution
C code :
#include <stdio.h>
 #include<ctype.h>
 #include<string.h>
void count_character(char str[]){
 char ch,*count_str;
 int *count_num;
 int i=0,j=0,k=0;
 
   
 for(i=0;i<strlen(str);i++){
 ch = toupper(str[i]);
 for(k=0; k<strlen(count_str); k++){
 if(ch == count_str[k]){
 count_num[k] = count_num[k]+1;
 goto skip;
 }
 }
 
 
 count_str[j] = ch;
 count_num[j++] = 1;
 skip : { };
 }
 printf(\"Character\\tNumber of Times\ \");
 for(i=0;i<strlen(count_str);i++){
 printf(\"%c \\t\\t %d\ \",count_str[i],count_num[i]);
 }
 printf(\"Total : %d \ \",strlen(count_str));
 }
int main()
 {
 char str[] = \"Programming Assignment\";
 count_character(str);
 return 0;
 }
NOTE :
i took a count_character(str) function which is used to calculate the character count. In that function i created 2 array pointers, one is char array and other is integer array pointer. count_str is used to store a character and count_num is used to maintain character count. every time one character is taken from string and converted into UPPER CASE , then i checked wheather character is repeated or not. if repeated count will be incremented else it add the character to count_str and count_num arrays. if Program LABEL and GOTO is used , when any character is found in count_str array then it skips the adding that character to count_str array.

