You are viewing a single comment's thread. Return to all comments →
int main(void){ char* arr = (char*)malloc(1000*sizeof(char)); int *finalDigit = (int )calloc(1000, sizeof(int)); if (finalDigit == NULL) { printf("Memory allocation failed\n"); return 1; } scanf("%s", arr); int digit = (int *)malloc(1000*sizeof(int)); int len = strlen(arr), digitCount=0; for(int i = 0;i
Seems like cookies are disabled on this browser, please enable them to open this website
Digit Frequency
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
int main(void){ char* arr = (char*)malloc(1000*sizeof(char)); int *finalDigit = (int )calloc(1000, sizeof(int)); if (finalDigit == NULL) { printf("Memory allocation failed\n"); return 1; } scanf("%s", arr); int digit = (int *)malloc(1000*sizeof(int)); int len = strlen(arr), digitCount=0; for(int i = 0;i