A software developer is developing a student records module that stores students' college details. The data is represented internally in the student.c module as follows: struct Student { char name[50]; int id ; double gpa ; } ; /* Data declared global, but private to student.c */ int ns = 0 ; static struct Student *sarr = NULL ; 1. Design an API to form the interface to this module. 2. Provide an example of client code that uses the interface from question 1 above to access the private data in a controlled way.
A software developer is developing a student records module that stores students' college details. The data is represented internally in the student.c module as follows: struct Student { char name[50]; int id ; double gpa ; } ; /* Data declared global, but private to student.c */ int ns = 0 ; static struct Student *sarr = NULL ; 1. Design an API to form the interface to this module. 2. Provide an example of client code that uses the interface from question 1 above to access the private data in a controlled way.
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT