AGE: Gender : BIRTHDATE : Course & Year : } #endif

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Make a c program
AGE:
Gender <F/M> :
BIRTHDATE :
Course & Year :
}
#endif
Transcribed Image Text:AGE: Gender <F/M> : BIRTHDATE : Course & Year : } #endif
1.) Define the ff. structures:
A structure "Studrec" having the following data members or components:
fiekd type size
idne string 15
studname structure type(firstname, middle name, lastname)
age int
gender char
hirtdate structure type (define another structure for birthdate)
Course year string 15
A structure "Subject" w/c contains the ff. data members:
totsubj integer
subject string 15
final_grade float
unit per_subject float
Follow this format:
Type the content between the border lines (exclude the lines):
* SAVE this file as "STUDENT.H" */
# ifndef STUDENT H
#define STUDENT H
struct name
);
struct birth
{
};
struct studrec
/* define eechh data member given above */
struct subject
-----
);
* define the following functions: "/
void read Studrec(struct studrec "ptrStud)
/* prornpt the user to input values in each
data mernber of structure studernt
thru its ptr vaniable *utrStud. You
can either choose using the indirection
operator(') or the arrow notation.
e.g. ("ptrStud).grade or ptrStud >grade
These are the items that you will asks from the user:
I| <sample inputs only>
I.D. number : 2000-1234
NAME: Juan B. dela Cruz
Age : 18
Gender<F/M> :M
Birthdete : May 16, 1989
Course & Year: B5CPE-1
float getSubj (struct subject *ptrStud)
/* this functiori prormpts the user to input N no. of subjects arid corresponding units (use for loop to repeat the
process based from the total number of subjects enrolled by a student)
Sample leyout:
(if the user for example inputs for)
No. of Subjects enrolled: 4
SUBJECT
UNITS GRADE
C5122
3.0
4.0
/"use loop structure to allow user/
CS123
3.0
4.5
/* to input N subjects w/ corresponding*/
ENGL 112
* units and grade"/
3.0
3.8
MATH113
4.0
3.9
Compute the student general point average using the formula:
SumProd - sumProd+ (units * grade)
total_unit - total_unit + units
GPA = surmPrau/total_unit
note: this function returns the computed average grade af
a student
*/vcid printStudrec(struct studrec *ptrStud)
/* outputs the inputted dnta follow this lavout
CEBJ INSTITUTE OF TECHNOLOGY - UNIVERSITY
CEBU CITY
ID number : <output the inputted value in each item >
NAME:
AGE:
Transcribed Image Text:1.) Define the ff. structures: A structure "Studrec" having the following data members or components: fiekd type size idne string 15 studname structure type(firstname, middle name, lastname) age int gender char hirtdate structure type (define another structure for birthdate) Course year string 15 A structure "Subject" w/c contains the ff. data members: totsubj integer subject string 15 final_grade float unit per_subject float Follow this format: Type the content between the border lines (exclude the lines): * SAVE this file as "STUDENT.H" */ # ifndef STUDENT H #define STUDENT H struct name ); struct birth { }; struct studrec /* define eechh data member given above */ struct subject ----- ); * define the following functions: "/ void read Studrec(struct studrec "ptrStud) /* prornpt the user to input values in each data mernber of structure studernt thru its ptr vaniable *utrStud. You can either choose using the indirection operator(') or the arrow notation. e.g. ("ptrStud).grade or ptrStud >grade These are the items that you will asks from the user: I| <sample inputs only> I.D. number : 2000-1234 NAME: Juan B. dela Cruz Age : 18 Gender<F/M> :M Birthdete : May 16, 1989 Course & Year: B5CPE-1 float getSubj (struct subject *ptrStud) /* this functiori prormpts the user to input N no. of subjects arid corresponding units (use for loop to repeat the process based from the total number of subjects enrolled by a student) Sample leyout: (if the user for example inputs for) No. of Subjects enrolled: 4 SUBJECT UNITS GRADE C5122 3.0 4.0 /"use loop structure to allow user/ CS123 3.0 4.5 /* to input N subjects w/ corresponding*/ ENGL 112 * units and grade"/ 3.0 3.8 MATH113 4.0 3.9 Compute the student general point average using the formula: SumProd - sumProd+ (units * grade) total_unit - total_unit + units GPA = surmPrau/total_unit note: this function returns the computed average grade af a student */vcid printStudrec(struct studrec *ptrStud) /* outputs the inputted dnta follow this lavout CEBJ INSTITUTE OF TECHNOLOGY - UNIVERSITY CEBU CITY ID number : <output the inputted value in each item > NAME: AGE:
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY