Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! I just need help with more debugging. Please help with debugging the entire solution below. Please just build off of the original solution posted.

Hello! I just need help with more debugging. Please help with debugging the entire solution below. Please just build off of the original solution posted. It is a collaborative solution so it might fit weird and I know this, but I am trying to incorporate someone else's code with mine and all help is appreciated !

What I am trying to accomplish:

---create a function that will input the keywords from the keyword text document into an array

---create a function that will scan the resume text document word by word while comparing and counting the number of times the resume word matched the keyword (Basically if only 5 keywords popped up in the entire resume the score of the resume should reflect 5%)

My solution:

**Please assume these files exist***

#include #include #include

int main() { FILE *keywordFile; char keywords[100][100];

keywordFile = fopen("keywordFile.txt", "r"); if (keywordFile == NULL) { printf("Unfortuntely, we encountered an issue when trying to access your file. Please contact tech support to solve your issue. The program will be exiting briefly"); exit(-1); } int line = 0; while (!feof(keywordFile) && !ferror(keywordFile)) { if (fgets(keywords[line], 100, keywordFile) != NULL) { char *s = strtok(keywords[line], ","); line++; } } fclose(keywordFile); FILE * res; int c; int count = 0; char skills[100]; res = fopen("resume.txt", "r" ); while(!feof(res)){ c = fgetc(res); if(c == ','){ break; } skills[count] = c; printf("%c", skills[count]); count ++;} printf("%d", count);

fclose(res); return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions