I need a project in C language on examination management system....where can i get it???


Question:


Answer:
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <stdlib.h>
#include <graphics.h>
#include <string.h>
#define TRUE 1
#define FALSE 0



void square1(int x1, int x2, int y1,int y2, int color );
void horiz_line1(int start, int end, int y, int color );
void vert_line1(int start, int end, int x, int color );
void square(int x1, int x2, int y1, int y2, int color );
void horiz_line(int start, int end, int y, int color);
void vert_line(int start, int end, int x, int color);
void introduction();
void user_guide();
void main_prog();
void about();
void flash_screen();
void print_string( int x, int y, int color,char *str);
void register1();


char lname[20],fname[20],name[50],s...

void main()
{

char choice;
char ans;
flash_screen();
clrscr();



while (1)
{
clrscr();

square(1, 80, 1, 24,8); /*for whole screen*/
square1(2,79,2,23,9);
square1(28,53,3,5,14);
square1(20,60, 7, 18,CYAN); /* for center square*/
square1(21,59,8,17,8);
square1(24,55, 20,22,RED); /* for lower square*/


print_string(35,4,4+BLINK,"MAI... MENU");
print_string(32,11,WHITE,"1: INTRODUCTION");
print_string(32,12,WHITE,"2: USER GUIDE");
print_string(32,13,WHITE,"3: TAKE EXAM");
print_string(32,14,WHITE,"4: ABOUT");
print_string(32,15,WHITE,"5: EXIT");

print_string(26,21,WHITE,"Ente... your choice! ");

choice = getche();
if (choice<'1' || choice>'5'){
gotoxy(47, 21);
}
getch();


switch(choice)
{

case '1':

introduction();
break;
case '2':
user_guide();
break;
case '3':
main_prog();
break;
case '4':
about();
break;
case '5':
clrscr();
square(1,80,1,24,8);
square1(2,79,2,23,9);
square1(16,60,11,14,RED);
print_string(30,4 ,14,"Exiting Program");
print_string(20,13,15,"Are you sure you want to exit? (y/n); ");
print_string(20,20,14,"Anwser: Yes(y) No(any character): ");

ans = getche();

if (ans== 'y' || ans == 'Y')
{

getch();
exit (0);
}

break;
default:
clrscr();
square(1,80,1,24,9);
square1(2,79,2,23,14);
square1(22,60,10,14,8);
print_string(25,6,9,"YOUR CHOICE IS NOT IN THE RANGE");
print_string(25,12,RED+BLINK,"... choice between 1 and 5!");
}
print_string(20,24,YELLOW,"Pre... any key to go back to main menu...");

getch();

}
}

void print_string( int x, int y, int color,char *str)
{
gotoxy (x,y);

textcolor(color) ;
cprintf("%s", str);


}

void horiz_line(int start, int end, int y,int color){

int x;

for (x=start; x<=end; x++)
{

gotoxy(x,y);
textcolor(color);

cprintf("Û");

}
}

void square(int x1, int x2, int y1, int y2, int color )

{
horiz_line(x1+1, x2-1, y1,color);
horiz_line(x1+1, x2-1,y2,color);
vert_line(y1, y2, x1,color);
vert_line(y1, y2, x2,color);
}

void vert_line(int start, int end, int x, int color){

int y;
for (y=start; y<=end; y++) {

gotoxy(x,y);
textcolor(color);


cprintf("Û");
}


}
void vert_line1(int start, int end, int x, int color){

int y;
for (y=start; y<=end; y++) {

gotoxy(x,y);
textcolor(color);


cprintf("Û");
}


}
void horiz_line1(int start, int end, int y,int color){

int x;

for (x=start; x<=end; x++)
{

gotoxy(x,y);
textcolor(color);

cprintf("Í");


}
}


void square1(int x1, int x2, int y1, int y2, int color )

{
horiz_line1(x1+1, x2-1, y1,color);
horiz_line1(x1+1, x2-1,y2,color);
vert_line1(y1, y2, x1,color);
vert_line1(y1, y2, x2,color);
}
void introduction()

{
clrscr();

square(1, 80,1,24,8);
square1(2,79,2,23,9);
print_string(35,4,RED,"INTRODU...
print_string(19,6,15,"The PCFC Scholarship Examination intends to assess ");
print_string(15,8,15,"the student's general academic achievement which will ");
print_string(15,10,15,"how far and how much knowledge have been acquired from ");
print_string(15,12,15,"the different subject taken from the basic eduction.");
print_string(19,14,15,"Specifi... it tries to assess the verbal and ");
print_string(15,16,15,"numeric... ability of the student.");
print_string(19,18,15,"Further... the test serve as the student's entrance ");
print_string(15,20,15,"or admisssion examination.");


}
void user_guide()

{
clrscr();

square(1,80,1,24,8);
square1(6,74,2,22,1);
/*square(18,65,5,20,CYAN); */

print_string(30,3,RED,"****USE... GUIDE****");
print_string(15,5,15,"When you are taking computerized entrance examination");
print_string(9,6,15,"you should registered first and your task is to answer all ");
print_string(9,7,15,"the 50 questions. ");
print_string(15,9,15,"But there are things to remember, put only the letter as ");
print_string(9,10,15,"your answer from the given option. It should be A, B, C, ");
print_string(9,11,15,"or D. You can only use small letter as you answer. You should ");
print_string(9,12,15,"always be careful when you answering if your answer doesn't ");
print_string(9,13,15,"belong to the given option, you can change your answer and ");
print_string(9,14,15,"select only from the given option. ");
print_string(15,16,15,"Since this is an entrance examination cheating is ");
print_string(9,17,15,"strictly prohibited. You can use ballpen and extra papers ");
print_string(9,18,15,"since there are questions need some computation. The questions ");
print_string(9,19,15,"included in this sotfware is all about English Vocabulary, ");
print_string(9,20,15,"Science & Technology, History, Computers, Mathematics and ");
print_string(9,21,15,"Astrolog... ");
print_string(33,22,RED+BLINK,"... LUCK!!");

}
void register1()
{

square(1,80,1,24,8);
square1(5,76,2,22,8);
print_string(20,3,14,"");
print_string(25,5,9,"");
print_string(35,7,9,"REGISTRAT...
print_string(10,9,15,"First name: ");
gets(fname);
print_string(10,11,15,"Last name: ");
gets(lname);
print_string(10,13,15,"Enter your gender: " );
gets(sex);
print_string(10,15,15,"Address... ");
gets(add);
print_string(30,23,14,"Press any key to begin ");
getch();
}
void main_prog()
{
FILE *fp;
char ans[50];
char str[80];
char correct[50];
int flag[75];
int i,q;
int score=0;
char answer[3];

struct {

char question[80];
char question1[80];
char option1[50];
char option2[50];
char option3[50];
char option4[50];
char ans;
} table1[100];
int x=0,y=0 ;
randomize();
clrscr();
register1();
clrscr();
fp=fopen("QUIZ.TXT","r");

while (!feof(fp)) {
fgets(table1[x].question, 80, fp);
y++;
fgets(table1[x].question1, 80, fp);
y++;
fgets(table1[x].option1, 50, fp);
y++;
fgets(table1[x].option2, 50, fp);
y++;
fgets(table1[x].option3, 50, fp);
y++;
fgets(table1[x].option4, 50, fp);
y++;
table1[x].ans=fgetc(fp);
fgets(str, 50, fp);
y++;
fgets(str, 50, fp);

if (y==7){
y=0;
x++;
}
}

for (i=0; i<=73; i++) {
flag[i]=FALSE;
}


for (i=0; i<=49; i++) {
clrscr();
do {
x=random(90);

} while (flag[x]==TRUE);

flag[x]=TRUE;
while (TRUE){
clrscr();
square(1,80,1,24,8);
square1(5,76,4,7,15);/*for question*/
square1(6,39,10,12,15);/* option 1*/
square1(41,76,10,12,15);/*opti... 2*/
square1(6,39,14,16,15);/*optio... 3*/
square1(41,76,14,16,15);/*opti... 4*/
square1(24,55,19,21,15);
print_string(35,1,12,"NO CHEATING");
gotoxy(35,3);
textcolor(YELLOW);
cprintf("QUESTION %d",i+1);
gotoxy(8,5);
textcolor(9);
cprintf("%s",table1[x].questio...
gotoxy(8,6);
textcolor(9);
cprintf("%s",table1[x].questio...
gotoxy(33,9);
printf("****CHOICES***");
gotoxy(9,11);
textcolor(12);
cprintf("%s",table1[x].option1...
gotoxy(43,11);
textcolor(12);
cprintf("%s",table1[x].option2...
gotoxy(9,15);
textcolor(12);
cprintf("%s",table1[x].option3...
gotoxy(43,15);
textcolor(12);
cprintf("%s",table1[x].option4...
gotoxy(26,20);
textcolor(15);
cprintf("Enter your answer: ");

gets(answer);


if (answer[0] != 'a' && answer[0] != 'b' && answer[0] != 'c' && answer[0] != 'd')
{
textcolor(15);
gotoxy(35,24);
cprintf("Invalid Entry");
getch();
}
else if (strlen(answer)!=1) {
textcolor(15);
gotoxy(35,24);
cprintf("Invalid Entry");
getch();
}
else {
break;
}


}
correct[i] = table1[x].ans;
ans[i] = answer[0];

}
clrscr();
for (i=0; i<=49; i++)
{
square(1,80,1,24,8);
square1(4,77,8,23,8);
if (ans[i] == correct[i])
{
score = score + 1;

}
}
print_string(25,3,12,"");
print_string(26,4,15," EXAMINATION");
print_string(38,6,9,"RESULT");

strcat(fname," ");
strcat(fname,lname);
gotoxy(15,10);
printf("Name: ");
gotoxy(22,10);
textcolor(14);
cprintf("%s",fname);
gotoxy(13,12);
printf("Gender: ");
gotoxy(22,12);
textcolor(14);
cprintf("%s",sex);
gotoxy(12,14);
printf("Address:");
gotoxy(22,14);
textcolor(14);
cprintf("%s",add);
gotoxy(14,16);
textcolor(15);
cprintf("SCORE:");
gotoxy(22,16);
textcolor(14);
cprintf("%d",score);

if (score >= 46)
{ gotoxy(11,18);
printf("Discount: ");
gotoxy(22,18);
textcolor(14);
cprintf("100%");
gotoxy(32,20);
textcolor(12+BLINK);
cprintf("Enroll Now!!");
gotoxy(24,21);
textcolor(12);
cprintf("Your Success is Within Your Reach");
}
else if (score >= 41)
{ gotoxy(11,18);
printf("Discount:");
gotoxy(22,18);
textcolor(14);
cprintf("50 %");
gotoxy(32,20);
textcolor(12+BLINK);
cprintf("Enroll Now!!");
gotoxy(24,21);
textcolor(12);
cprintf("Your Success is Within Your Reach");
}
else if (score >= 36)
{ gotoxy(11,18);
printf("Discount:");
gotoxy(22,18);
textcolor(14);
cprintf("45%");
gotoxy(32,20);
textcolor(12+BLINK);
cprintf("Enroll Now!!");
gotoxy(24,21);
textcolor(12);
cprintf("Your Success is Within Your Reach");
}
else if (score >= 31)
{ gotoxy(11,18);
printf("Discount:");
gotoxy(22,18);
textcolor(14);
cprintf("40%");
gotoxy(32,20);
textcolor(12+BLINK);
cprintf("Enroll Now!!");
gotoxy(24,21);
textcolor(12);
cprintf("Your Success is Within Your Reach");
}
else if (score >= 26)
{ gotoxy(11,18);
printf("Discount:");
gotoxy(22,18);
textcolor(14);
cprintf("35%");
gotoxy(32,20);
textcolor(12+BLINK);
cprintf("Enroll Now!!");
gotoxy(24,21);
textcolor(12);
cprintf("Your Success is Within Your Reach");
}
else if (score >= 21)
{ gotoxy(11,18);
printf("Discount:");
gotoxy(22,18);
textcolor(14);
cprintf("30%");
gotoxy(32,20);
textcolor(12+BLINK);
cprintf("Enroll Now!!");
gotoxy(24,21);
textcolor(12);
cprintf("Your Success is Within Your Reach");
}
else if (score >= 15)
{ gotoxy(11,18);
printf("Discount:");
gotoxy(22,18);
textcolor(14);
cprintf("25%");
gotoxy(32,20);
textcolor(12+BLINK);
cprintf("Enroll Now!!");
gotoxy(24,21);
textcolor(12);
cprintf("Your Success is Within Your Reach");
}
else if (score >= 10)
{ gotoxy(11,18);
printf("Discount:");
gotoxy(22,18);
textcolor(14);
cprintf("20%");
gotoxy(32,20);
textcolor(12+BLINK);
cprintf("Enroll Now!!");
gotoxy(24,21);
textcolor(12);
cprintf("Your Success is Within Your Reach");
}
else
{ gotoxy(11,18);
printf("Discount:");
gotoxy(22,18);
textcolor(14);
cprintf("0%");
gotoxy(25,20);
textcolor(12);
cprintf("You Can Enroll with Full Tuition");
}
}
void about()
{
char ans1;

clrscr();

square(1,80,1,24,8); /*main square*/
square1(2,79,2,23,9);
square1(10,70,3,8,14);/*for the programmer sqaure*/
square1(5,38,10,20,14);/*for the designer square*/
square1(43,76,10,20,14);/* for analysts square*/



}

void flash_screen()
{
int x;
int gd=DETECT, gm;
initgraph(&gd, &gm, "");

setcolor(15);
settextstyle(0,0,1);
outtextxy(180,50, "");
setcolor(14);
settextstyle(0,0,7);
outtextxy(150,150,");
setcolor(12);
settextstyle(0,0,1);
outtextxy(150,230," EXAMINATION SOFTWARE");
setcolor(14);
settextstyle(0,0,1);
outtextxy(155,450,"");


setcolor(15);
settextstyle(0,0,1);
sleep(1);
outtextxy(200,400,"Loading");
setcolor(9);

for (x=260; x<=340;x=x+5)
{
outtextxy(x,400,"þ");
/*sleep(1); */
delay(100000);

}

closegraph();
}
Buy it.
you can find project details in this website

www.freshmeat.net

ALL THE BEST
More Questions & Answers...
  • What are the limitations of designing and testing a bridge using computer softwares like abaqus cae using fea?
  • Please help! I am looking for a site that give decision making philosophies and examples.?
  • How do does the human resource count PTO?
  • Disregarding the specific topic and being out of context?
  • Business projects that can help a rapidly expanding company?
  • What human resources is all about?
  • What is the latest version of Winrunner and from where I can get the Documentation for that? please tell me?
  • What are the points to remember for Implementing ERP in depositories firm in India?
  • The questions and answers post by the user, for information only, AnswersRoom.com does not guarantee the right
    Copyright © 2007 AnswersRoom.com -   Terms of Use -   Contact us

    Hot Topic