C Program to input and display details of students using structure.
In this example, we will enter the details of students like roll number, name and total marks using structure and will be displayed. The total number of student should be entered according to the requirements of the user(maximum value is 50). We can increase the maximum number by changing the statement struct student[50]; to struct student[100];
Here in the output we have entered details of four student and displayed them accordingly.
PROGRAM
OUTPUT
Enter the number of students :4
Enter the Students Details.
Enter Roll Number : 1
Enter Name : Jack
Enter total : 98
Enter Roll Number : 2
Enter Name : Lisa
Enter total : 87
Enter Roll Number : 3
Enter Name : Marie
Enter total : 93
Enter Roll Number : 4
Enter Name : Steve
Enter total : 76
Displaying the Student Details.
Roll Number Name Total
1 Jack 98
2 Lisa 87
3 Marie 93
4 Steve 76
NOTE: You Can Comment Your Code if you have solved differently and we will pin it in the comment section. Let's Learn together.
MOTTO:
You Learn, I Learn together We Learn.
Comments
Post a Comment
Please do not spam any link