Answer:
Part 2 is remaining I m working on it
Explanation:
#include <iostream>
using namespace std;
struct student {
int Rollno;
char Studentname[50];
int marks;
char semester[50];
};
int main() {
struct student stud[2] = { { 1 , "nasir" , 300 , "4th" } , { 2 , "abid" , 400 , "4th" } };
cout<<"Students Result is given as follows:"<<endl;
cout<<endl;
for(int i=0; i<2;i++) {
cout<<"Roll no: "<<stud[i].Rollno<<endl;
cout<<"Name: "<<stud[i].Studentname<<endl;
cout<<"Marks: "<<stud[i].marks<<endl;
cout<<"Semester : "<<stud[i].semester<<endl;
cout<<endl;
}
return 0;
}