consider an array MARKS [20] [5] which stores the marks obtained by 20 students in 5 subjects. now write a program.
(a.) find the average marks obtained in each subject.
(b.)find the average marks obtained by every student
(c.) find the number of students who have scored below 50 in their average.
(d.) display the scores obtained by every student.
Write a program that accepts grade as input from the user and stores these grades in twodimensional array with dimension of 5 rows and by 5 columns. Then count the number of grades that
passed and the number of grades that failed. Grade that pass must be greater or to equal to 80.
Enter the grades: 90 95 78 89 88 71 72 79 81 82 77 74 78 88 91 73 77 75 84 98 76 89 71 87 73 79
There are 12 that passed.
There are 13 that failed.
Make a program code reverse the display from N to 1 to 1-N
Write a program that uses a two-dimensional array to store the highest and lowest temperatures (in
Celcius) for each month of the year. The program should output the average high, average low, and the
highest and lowest temperatures for the year. Your program must consist of the following functions:
a) Function getData(): This function reads and stores data in the two-dimensional array.
b) Function averageHigh(): This function calculates and returns the average high temperature for
the year.
c) Function averageLow(): This function calculates and returns the aver-age low temperature for
the year.
Writing a function that calculates the occurrence of an integer A in an integer array T of size N.
modify the class queues so that it now behaves as a priority queue. A priority queue is a queue whose enqueue function is different in such a way that if a node has a priority value higher than the one already in the queue, it rearranges so that now the higher priority node is before the lower priority node in the queue.
we shall make a priority queue of a shopping list. the shopping list is defined by a dynamic collection of nodes containing itemName and isleNo. the list is prioritized according to isleNo. in any shopping mart, the isle numbers are arranged in ascending order. a mart can only have 20 isles at maximum.
1 What do you mean by Program? Briefly describe the basic structure of C programs. 08
2 What is a token? Differentiate between a for loop and a while loop? What are it uses? 08
3 What is a data type? Differentiate between array and pointer. Write a program to interchange
2 variables without using the third one. 08
4 What is an array of pointers? Is it possible to have negative index in an array? Why is it
necessary to give the size of an array in an array declaration? 08
5 Submit a Report "the impact of improving debugging skill on programming ability"
Write a pseudo code for Swap the contents of two variables using a third variable.
8.Write pseudo code for Find the area of a circle where the radius is provided by the user.
You are given a file consisting of students’ names in the following form: lastName, firstName middleName. (Note that a student may not have a middle name.)
Write a program that converts each name to the following form: firstName middleName lastName. Your program must read each student’s entire name in a variable and must consist of a function that takes as input a string, consists of a student’s name, and returns the string consisting of the altered name to print to the terminal. Use the string function find to find the index of ,; the function length to find the length of the string; and the function substr to extract the firstName, middleName, and lastName.