Student Marksheet Program in C YASH PAL, March 5, 2022July 13, 2025 Student Marksheet program in C – In this tutorial, we are going to make a simple student marksheet or mark list program in the C programming language.Using this program a student can enter their Name, Roll Number, University Name, Father’s Name, and marks of their university exam. After that based on the marks, the program can print the mark sheet of the student that he fails or passes.Introduction to Student Marksheet program in CTo understand this project, you should have basic knowledge of C programming, such as how an array of strings works and how to take input and print the data from the string array in C programming.If you are a beginner in C programming then this is a useful project for you. you can either modify this program or use it in your project.Also, my suggestion is that you first try to create this project on your own and if you are stuck at any point then you can use my code for reference or help. // C Program to print the student mark sheet #include<stdio.h> #include<stdlib.h> #include<conio.h> int main() { char subjects[6][25] = {"Chemistry", "C Programming", "Mathematics", "Environment", "Electrical & Electronics", "Machine Engineering"}; char subjcode[6][7] = {"CH-102", "CS-102", "MA-111", "CS-107", "EE-101", "ME-101"}; int midmarks[6],semmarks[6], i=0; int MTotal = 0,count = 0; char name[30], fname[30], rno[10], college[50]; printf("Enter your name: "); gets(name); printf("nEnter your Father name: "); gets(fname); printf("nEnter your Roll Number: "); gets(rno); printf("nEnter your College name: "); gets(college); for(i=0; i<6; i++) { printf("nEnter your midterm marks for %s: ", subjects + i); scanf("%d",&midmarks[i]); printf("Enter your semester marks for %s: ", subjects + i); scanf("%d",&semmarks[i]); } printf("nnnntt********************** YOUR RESULT *********************nn"); printf("ttCOLLEGE: %s", college); printf("nttNAME: %sttFATHER NAME: %s", name, fname); printf("nttROLL NUMBER: %s", rno); printf("nttSUBJECTS t Marks1 t Marks2 t TOTAL"); for(i = 0; i < 6; i++) { printf("nt"); printf("t%s tt %d tt %d tt %d",subjcode[i], midmarks[i], semmarks[i], midmarks[i] + semmarks[i]); MTotal = MTotal + midmarks[i] + semmarks[i]; if (midmarks[i] + semmarks[i] < 44) count = count + 1; } if (count == 0) printf("nnttTOTAL MARKS: %d ttRESULT: PASS", MTotal); else printf("nnttTOTAL MARKS: %d ttRESULT: FAIL", MTotal); return 0; }InputOutputConditions/Logic for a student to pass the examTo pass the university exam, a student needs to have at least a total of 44 points or marks in all particular subjects, including midterm marks and semester marks.Also, if a student has 0 marks in the midterm exam and 44 marks in the semester exam, then the student passes the particular subject exam.ExampleThe condition/logic for a student to fail in the examIf a student does not have at least 44 marks in any one subject then he fails. so we need to print the fail in the program.ExampleExplanation of the programHere in the above program first we define the subjects String array in which we define the subject names and then we define a subcode String array that consists of subject codes, and then we define the two empty integer arrays mid marks and semarks and two int variables count and MTotal and initialize its values to zero.After that, we take the input from the user name, fname, number, and college using the gets method(we can also use the scanf function for taking input, but scanf does not take white spaces in a string). After that, using a for loop, we take the input for the subject marks and store them in the midmarks and semmarks integer arrays.After that, using the printf method, we print the college name, the student’s name, his father’s name, and his roll number. Then, we print the subject code, midterm marks, semester marks, and the total number of marks in a separate line using a for loop, as you can see in the above image.By using the count variable we are finding that if there is any subject for which the total number of marks is less than 44 then we print the FAIL message on the screen. otherwise, we print the PASS message on the screen.Also, readStudent marksheet program in PythonStudent marksheet program in CStudent marksheet program in Java c solutions c programmingengineering subjectssolution