Language
C
Compiler
gcc 12.1.0
Options
Warnings
Optimization
C99
-pedantic
$ gcc prog.c -Wall -Wextra -O2 -march=native -std=c99 -pedantic
Enter the number of students:
Enter student's name: Enter student's rollno: Enter the student's marks: Enter the student's marks: Enter the student's marks:
Enter student's name: Enter student's rollno: Enter the student's marks: Enter the student's marks: Enter the student's marks:
Enter student's name: Enter student's rollno: Enter the student's marks: Enter the student's marks: Enter the student's marks:
Enter student's name: Enter student's rollno: Enter the student's marks: Enter the student's marks: Enter the student's marks:
Enter student's name: Enter student's rollno: Enter the student's marks: Enter the student's marks: Enter the student's marks:
student's Information-------------
Student's Name: hoge
Student's Rollno: 123
Subject 1 Marks: 1
Subject 2 Marks: 2
Subject 3 Marks: 3
Total Marks: 6
Total Percent: 2.00
Student's Name: fuga
Student's Rollno: 456
Subject 1 Marks: 4
Subject 2 Marks: 5
Subject 3 Marks: 6
Total Marks: 15
Total Percent: 5.00
Student's Name: foo
Student's Rollno: 112233
Subject 1 Marks: 11
Subject 2 Marks: 22
Subject 3 Marks: 33
Total Marks: 66
Total Percent: 22.00
Student's Name: meow
Student's Rollno: 111
Subject 1 Marks: 1
Subject 2 Marks: 1
Subject 3 Marks: 1
Total Marks: 3
Total Percent: 1.00
Student's Name: mofu
Student's Rollno: 999999
Subject 1 Marks: 99
Subject 2 Marks: 99
Subject 3 Marks: 99
Total Marks: 297
Total Percent: 99.00
Sort the Array in ascending order of marks:Student's Name: meow
Student's Rollno: 111
1 1 1 Total Marks: 3
Total Percent: 1.00
Student's Name: hoge
Student's Rollno: 123
1 2 3 Total Marks: 6
Total Percent: 2.00
Student's Name: fuga
Student's Rollno: 456
4 5 6 Total Marks: 15
Total Percent: 5.00
Student's Name: foo
Student's Rollno: 112233
11 22 33 Total Marks: 66
Total Percent: 22.00
Student's Name: mofu
Student's Rollno: 999999
99 99 99 Total Marks: 297
Total Percent: 99.00
Exit Code:
0