Student Marksheet Program in C Programming YASH PAL, March 5, 2022February 25, 2023 In this tutorial, we are going to make a simple student marksheet or mark list program in 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 pass. Introduction to Student Marksheet program in c. To 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. [br] 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. [br] Student Marksheet Program in C Programming [br] // 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; } Input Output Conditions/Logic for a student to pass the exam To pass the university exam a student needs to have at least a total of 44 number or marks in all particular subjects including midterm marks and semester marks. [br] Also if a student has 0 marks in the midterm exam and 44 marks in the semester exam then also a student passes the particular subject exam. Example Condition/logic for a student to fail in the exam If 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. Example Explanation of program Here 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. [br] After that, we are taking 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 for loop we are taking the input for the subject marks and store them in the midmarks and semmarks integer array. [br] After that using the printf method we print the college name, student name, his father’s name, and his roll number. Then, we are printing the subject code, midterm marks, semester marks, and the total number of marks in a separate line using for loop as you could see in the given above image. [br] 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. [br] Also, read Student marksheet program in Python programming c solutions c programmingengineering subjectssolution