Marks obtained by a batch of students in the Annual Examination are tabulated as follows:  Student name Marks obtained  S.Laxmi 45 67 38 55  V.S.Rao 77 89 56 69  - - - - - - It is required to compute the total marks obtained by each student and print the rank list based on  the total marks.  The program in below figure stores the student names in the array name and the marks in the  array marks. After computing the total marks obtained by all the students, the program prepares  and prints the rank list. The declaration  int marks[STUDENTS][SUBJECTS+1];  Defines marks as a pointer to the array's first row. We use rowptr as the pointer to the row of  marks. The rowptr is initialized as follows:  int (*rowptr)[SUBJECTS+1] = array;  Note that array is the formal argument whose values are replaced by the values of the actual  argument marks. The parentheses around *rowptr makes the rowptr as a pointer to an array of  SUBJECTS+1 integers. Remember, the statement  int *rowptr[SUBJECTS+1];  would declare rowptr as an array of SUBJECTS+1 elements.  When we increment the rowptr (by rowptr+1), the incrementing is done in units of the size of  each row of array, making rowptr point to the next row. Since rowptr points to a particular row,  (*rowptr)[x] points to the xth element in the row.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Marks obtained by a batch of students in the Annual Examination are tabulated as follows: 
Student name Marks obtained 
S.Laxmi 45 67 38 55 
V.S.Rao 77 89 56 69 
- - - - - -
It is required to compute the total marks obtained by each student and print the rank list based on 
the total marks. 
The program in below figure stores the student names in the array name and the marks in the 
array marks. After computing the total marks obtained by all the students, the program prepares 
and prints the rank list. The declaration 
int marks[STUDENTS][SUBJECTS+1]; 
Defines marks as a pointer to the array's first row. We use rowptr as the pointer to the row of 
marks. The rowptr is initialized as follows: 
int (*rowptr)[SUBJECTS+1] = array; 
Note that array is the formal argument whose values are replaced by the values of the actual 
argument marks. The parentheses around *rowptr makes the rowptr as a pointer to an array of 
SUBJECTS+1 integers. Remember, the statement 
int *rowptr[SUBJECTS+1]; 
would declare rowptr as an array of SUBJECTS+1 elements. 
When we increment the rowptr (by rowptr+1), the incrementing is done in units of the size of 
each row of array, making rowptr point to the next row. Since rowptr points to a particular row, 
(*rowptr)[x] points to the xth element in the row.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education