[Solved] : Question 157635

1.    Create an array of size 100 and assign some random number from 0 to 50 in it using rand() and Srand() function(your lab instructor will tell you about these functions).

Note: (Assume index number +5) is roll number of student. For example






 45 are marks of Roll # L1F20BSCS5

 34 are marks of Roll# L1F20BSCS7

2.    Find the index of maximum point and print the roll# along with message “Winner” Note: (don’t use sorting code here)

3.    Find the index of 2nd maximum points (using 1st maximum points) and print the roll# along with message “Runner up”

Note: (don’t use sorting code here)

4.    Calculate average of array i.e., Sum of all points in array and divide them by size of array

5.    Check if its lower than 25 or not? and print appropriate message on screen.

6.    Create a new array of similar size and copy all numbers in new array. Now sort the new array in descending order and print all values


Challenge: Print the roll# of students having similar points


Sample Output:

Student_Points : 5 21 0 23 10 5

Student L1F20BSCS8 is Winner

Student L1F20BSCS6 is Runner up

Average of Students points are: 12.8

Average of points is below 25; hence participants are not good programmers

Students points in order are: 23 21 5 5 0 

Expert Answer

Answer to : Question 157635

Leave a Comment


We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?