Design and implement a structured program for manipulating arrays data structures, as follow:
1- Use two dimensional string array data structure of five rows and six columns to store the data of five students, each student is identified by (stid, fname, and four final marks).
2- Then, split the above array into two other two dimensional arrays:
a- One for the (stid, and the fname) for the five students.
b- The other for (stid and the four final marks).
c- Show the contents of the new array (stid and the four final marks).
d- Prepare test data and implement it (run).

Design and implement a structured program for manipulating arrays data structures as follow 1 Use two dimensional string array data structure of five rows and s class=

Respuesta :

#include <stdio.h>

struct student {

char firstName[50];

int roll;

float marks;

} s[5];

int main() {

int i;

printf("Enter information of students:\n");

// storing information

for (i = 0; i < 5; ++i) {

s[i].roll = i + 1;

printf("\nFor roll number%d,\n", s[i].roll);

printf("Enter first name: ");

scanf("%s", s[i].firstName);

printf("Enter marks: ");

scanf("%f", &s[i].marks);

}

printf("Displaying Information:\n\n");

// displaying information

for (i = 0; i < 5; ++i) {

printf("\nRoll number: %d\n", i + 1);

printf("First name: ");

puts(s[i].firstName);

printf("Marks: %.1f", s[i].marks);

printf("\n");

}

return 0;

}

#◌⑅⃝●♡⋆♡Nåmřāthā ♡⋆♡●⑅◌