Question: This has to be in C Define a student record, initialize it, and print out its values. Include data members for the following student information.
This has to be in C
Define a student record, initialize it, and print out its values.
Include data members for the following student information. Use the specified data types.
name (20 characters)
identification number (int)
GPA (double) - round to two decimal places when you print this
Declare an array of students and initialize it for at least three students
Define two separate print functions; one using array indexing and the other using pointer referencing. Pass the array by const to prevent mutation of the array in these functions.
Sample output Bill Gates 1001 3.92
Steve Jobs 1002 3.44
Dennis Ritchie 1003 3.86
As before, your grade will be based on the correctness of your output, as well as the proper use of the following:
1. meaningful variable names
2. indentation
3. blank lines and spacing
4. comments on the following:
- program description
- function descriptions
- all variable and constant declarations
- ambiguous or complex sections of code
5. the correct use of local variables, local function prototypes, and parameter passing
6. format and appearance of output
7. structured code (e.g., no goto, break (except in a switch), continue, etc. statements)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
