Final answer:
To declare a student structure in C that contains name, first name, and student number, you can use the 'struct' keyword. To initialize the cell and display its contents, use the 'scanf' function to read input values into the structure variables and the 'printf' function to display the values.
Step-by-step explanation:
Question 1:
To declare a student structure in C that contains his name, first name, and student number, you can use the following code:
struct Student {
char name[50];
char firstName[50];
int studentNumber;
};
Question 2:
To initialize the cell by taking the three parameters from the keyboard, you can use the scanf function to read input values into the structure variables. Here's an example:
void initializeStudent(struct Student *s) {
printf("Enter name: ");
scanf("%s", s->name);
printf("Enter first name: ");
scanf("%s", s->firstName);
printf("Enter student number: ");
scanf("%d", &s->studentNumber);
}
Question 3:
To display the contents of the cell passed as a parameter, you can use the following function:
void displayStudent(struct Student s) {
printf("Name: %s\\", s.name);
printf("First Name: %s\\", s.firstName);
printf("Student Number: %d\\", s.studentNumber);
}