Question: Given the following program: #include struct student { int id; char name[20]; char grade; }; void func(struct student stud); int main() { struct student astud;
Given the following program:
#include
int id; char name[20]; char grade;
}; void func(struct student stud); int main() {
struct student astud; astud.id=9401; strcpy(astud.name, "Joe"); astud.grade = 'A'; func(astud);
return 0; }
Abdelghani Bellaachia, CSCI 1121 Page: 16 void func(struct student astud) {
printf(" Id is: %d ", astud.id); printf(" Name is: %s ", astud.name); printf(" Grade is: %c ", astud.grade);
}
Modify this program to include the address of a student as a separate structure. The address should include the following:
Address as an array of 30 characters
City as a an array of 20 characters
Zipcode as an integer.
in C programin language
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
