Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need answer in C Problem 5: Best Employee Scores (30 p) A company wants to keep track of the scores of their employees for a

Need answer in C image text in transcribed
Problem 5: Best Employee Scores (30 p) A company wants to keep track of the scores of their employees for a recent training course they attended. The scores are stored in an integer array, and the company wants to know the total number of employees who scored above a certain threshold. Problem: Write a C program that takes employee scores and stores them in an integer array and the threshold value as input. The program should pass the array to a function that finds the number of employees who scored above the threshold value, and returns this value to the main function. The function should also find the size of the array inside the function without passing it as a parameter. Compiler Code: gcc p5.c-op5-std=c18-pedantic-Wall-Wextra -Werror Have to compile code with no errors or flags, or risk losing all points Instructions: 1. Declare an integer array inside the main function to store the scores of employees. Ask the user of the program to until- 1 is typed and store the scores in the array. 2. In the main function, prompt the user to input the threshold value and use it as a pointer. 3. Declare a function that takes the array of scores and the threshold value as input parameters. 4. Make sure to define the threshold parameter as a constant. 5. Inside this function, find the size of the array using the sizeof operaton. 6. Traverse the array using a loop and find the number of employees who scored above the threshold value

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

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

Identify four main characteristics of successful entrepreneurs.

Answered: 1 week ago

Question

3. What may be the goal of the team?

Answered: 1 week ago

Question

Is how things are said consistent with what is said?

Answered: 1 week ago