Professional Documents
Culture Documents
Sample Code
Sample Code
Sample Code
// 1
struct student
string name;
int totalSubjects;
int marks[20];
};
// 2
// 3
}
int main()
// 4
int totalStudents;
// 5
if (totalStudents <= 0)
return -1;
student studentArray[totalStudents];
// 6
// 7
cout << "Enter the name of student " << (i + 1) << " : " < < endl;
// 8
return -1;
// 9
cout << "Enter marks for subject " << (j + 1) << " : " << endl;
// 10
printStudentDetails(studentArray, totalStudents);