Question: Can I get help translating this into pseudo code? Thank you #include #include #include int main() { FILE *fp, *fp1; int x; char line[100]; char

Can I get help translating this into pseudo code? Thank you

#include #include #include

int main() {

FILE *fp, *fp1;

int x; char line[100]; char words[100][50];

fp = fopen_s("keyword.txt", "r"); if (fp == NULL) { printf("Error opening file "); return 0; }

int count = 0; while (fgets(line, 100, fp) != NULL) { char *ch = strtok_s(line, ","); while (ch != NULL) { strcpy_s(words[count], ch); count++; ch = strtok_s(NULL, ","); } }

fclose(fp); fp = fopen_s("resume.txt", "r"); if (fp == NULL) { printf("Error opening file "); return 0; }

int count1 = 0; while (fgets(line, 100, fp) != NULL) { char *ch = strtok_s(line, " "); while (ch != NULL) { for (x = 0; x < count; x++) { if (strcmp(ch, words[x]) == 0) { count1++; } } ch = strtok_s(NULL, ","); } }

fclose(fp); printf("Total count of keywords is %d ", count1);

return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!