Hey ppl I am wirting a code for job hunt and need ur help."here is the problem desciption:a job consulting firm recruits applicants to various job positions in different companies based on the percentage of marks scored by the applicants and the positions to which the yapply. you have to develop a program to process a file containing the job requirements data and applicants data and place the applicants in various companies. input format the input contains; number of companies,number of job positions.2.for each position in a company, a.company number b.position number'c.minimum cut off for the position 3.number of applicants a.name b.% marks 5 company names to whihc applicant is applying 6. job position to which applicant is applying. please help me get this program solved.
the more info you provide (as well as the code you've tried), the more likelihood you'll get a response. I'd think you'd want/need a structure or two... post a sample of the input file.
HI hobbyist , I need a solution for the given problem .. Can any one help me.. A job consulting firm recruits applicants to various job positions in different companies based on the percentage of marks scored by the applicants and the positions to which they apply. You have to develop a program to process a file containing the job requirements data and applicants data and place the applicants in various companies. Input Format The input contains; 1. Number of companies, Number of job positions, b 2. For each position in a company, a. Company number b. Position no c. Minimum cutoff for the position 3. Number of Applicants 4. For each applicant a. Name (Word without spaces) b. %marks Constraints • The applicants need not be considered if the minimum cutoff for the applied job position is not met (equal to cutoff percentage means eligible for selection) • There would be a max of 1000 companies, and 100 positions in each company. • Max number of applicants is 100000. • Placements should be done in such was as to maximize the number of placements. If there are multiple such placements, you can output any one of them. • If there are multiple candidates who qualify for a position, the candidate with higest marks should be choosen. • If there is a contention between 2 candidates with the same marks for a position, the candidate whose name comes first in the input has to be placed. • If there is a contention between 2 positions, the position which appears first has to be filled first. Sample Input 2 4 1 1 80 1 2 70 2 1 70 2 2 80 5 SHARAT 90 BIJU 75 SUMA 75 BABU 72 TANAY 72 Sample Output Company 1 Position 1 : SHARAT Company 1 Position 2 : BIJU Company 2 Position 1 : SUMA Company 2 Position 2 : Not filled
Hello; have you tried using a linked list? maybe something like Code: struct company { char status[20]; // not filled or name of applicant int comp; // company identifier int pos; // position identifier int score; // min value needed for position struct company *next; // node }; struct applicant { char name[20]; // applicant's name int score; // applicant's score int placed; // identifier if applicant was placed or not struct applicant *next; }; typedef struct company c_data; typedef struct applicant a_data; when you read the file, assuming it's a text file, you've got a couple of choices a) using fscanf, which will break on white space or b) fgets, which reads the entire line. If it were me, I'd use fgets and count lines in the file... assuming, the format is the same time each time. line == 0 initialize company's list and store the max companies/positions into vars line < 5 store data in company's list (according to criteria) line == 5 initialize applicant's list line > 5 store data in applicant's list (according to criteria) Not tested, but I *think* you can then create a couple of loops; the outer loop being the applicants and the inner loop being the company. compare the position for being "filled" along with the required score of the position with that of the applicant... if they're in agreement, modify the appropriate fields. HTH