add1

Monday, October 10, 2016

MCSL 017 C and Assembly Language Programming

MCSL 017 
MCA 1st semester 
Section 1: C Programming Lab

   1.         Write an interactive program in C language to create an application program for your study centre. This application should be having menu options like student‟s details (Name, Enrollment, Address, Programme, course, contact, etc), semester enrolled for, assignments submitted and marks obtained, attendance for the practical courses etc. The application should be designed user-friendly.
  


 STUDY MANAGEMENT SYSTEM PROGRAM ON C LANGUAGE

#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
    struct student{
    char name[20];
    int Enroll[12];
    char address[20];
    char program;
    char course;
    int contact[10];
    int sems;
    char ass[3];
    int marks[10][10];
    int atte;
}s[20];
void show(int nos)
{
int i;
printf("\n\t\t\tSTUDENT RECORD ARE AVILABLE IN THE RECORD\n");
printf("\n\t_____________________________________________________________________\n");
printf("NAME : ENROLMENT : ADDRESS : PROGRAM : COURSE :  CONTACT  : SEMESTER :ASINMENT:");
for(i=0;i<nos;i++)
{
printf("\n%s : %d : %s : %s : %s : %d : %d : %s ",s[i].name,s[i].Enroll,s[i].address,s[i].program,s[i].course,s[i].contact,s[i].sems,s[i].ass);
}
printf("\n\t\t\tSTUDENT MARKS & ATTENDENCE RECORD ARE AVILABLE IN THE RECORD\n");
printf("\n\t_____________________________________________________________________\n");
printf("NAME : ENROLMENT : MCS11 : MCS12 : MCS13 : MCS14 : MCS15 : MCS16 : MCS17 : ATTENDENCE");
for(i=0;i<nos;i++)
{
printf("\n%s : %d : %d : %d : %d : %d : %d : %d : %d : %d  \n",s[i].name,s[i].Enroll,s[i].marks[i][1],s[i].marks[i][2],s[i].marks[i][3],s[i].marks[i][4],s[i].marks[i][5],s[i].marks[i][6],s[i].marks[i][7],s[i].atte);

}

}
void enrol(int no)
{
    int i,j;
    char data;
    printf("\t\t\tEnter the student Record \n");
    for(i=0;i<no;i++)
    {
    printf("NAME        :  ");
    scanf("%s",&s[i].name);
    printf("ENROLLMENT  :  ");
    scanf("%d",&s[i].Enroll);
    printf("ADDRESS     :  ");
    scanf("%s",&s[i].address);
    printf("PROGRAM     :  ");
    scanf("%s",&s[i].program);
    printf("COURSE      :  ");
    scanf("%s",&s[i].course);
    printf("CONTACT     :  ");
    scanf("%d",&s[i].contact);
    printf("SEMESTER    :  ");
    scanf("%d",&s[i].sems);
    printf("\n\t\t in next option enter only yes or no\t\n");
    printf("ASSINMENT   :  ");
    scanf("%s",&s[i].ass);
    printf("\t\tMARKS      \n");
    for(j=1;j<=7;j++)
    {
        printf("MCS 01%d : ",j);
        scanf("%d",&s[i].marks[i][j]);
    }
    printf("ATTENDENCE    :  ");
    scanf("%d",&s[i].atte);
}   
}
main()
{
    int ch=0,n;
    printf("\n\t\tSTUDY CENTER MANAGMENT PROGRAM\n");
    while(ch<4)
    {
        printf("\t1: ENROLL STUDENT RECORD\n");
        printf("\t2: DISPLAY STUDENT RECORD\n");
        printf("\t3: EXIT\n\n\n");
        printf("\tEnter Your Choice :  ");
        scanf("%d",&ch);
        switch(ch)
        {
            case 1:
            printf("Enter the no of student you will store record ");
            scanf("%d",&n);
             enrol(n);
               break;
            case 2: show(n);break;
            case 3: exit(1);break;
        }
    }
}

No comments:

Post a Comment