Preview

C Source Code for Online Examination

Better Essays
Open Document
Open Document
1021 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
C Source Code for Online Examination
SOURCE CODE
#include
#include
#include
#include
#include

main()
{
int score=0; char ch,temp,login[100],*pass; textcolor(0); textbackground(15); clrscr(); printf("\n\n\n\n\n\n\n\n\n\n\t\tWELCOME TO 'YUUVVA'ONLINE EXAMINATION\n\n\t\tPRESS ENTER TO CONTINUE\n\n\t\t"); temp=getchar(); clrscr(); printf("\n\n\n\n\n\n\n\n\n\t\t\tENTER YOUR LOGIN\n\n\t\t\t"); scanf("%s",login); printf("\n\n\n\n\t\t\tENTER PASSWORD\n\n\t\t\t"); pass=getpass(" "); while(strcmp(login,pass)!=0) { printf("\n\n\t\t\tINVALID PASSWORD\n\n\t\t\t"); printf("\n\n\t\t\tENTER YOUR PASSWORD\n\n\t\t\t"); pass=getpass(" "); } temp=getchar(); clrscr();

printf("\n\n\t\tREAD THE FOLLOWING RULES CAREFULLY\n\n\n1.THE EXAMINATION IS FOR 3 SUBJECTS: PHYSICS, CHEMISTRY, MATHEMATICS\n\n2.EACH SUBJECT HAS 10 QUESTIONS EACH\n\n3.THE QUESTIONS ARE OF MULTIPLE CHOICE TYPE WITH 4 OPTIONS A, B, C, D OUT OF WHICH ONLY ONE IS APPROPRIATE\n\n4.+4 MARKS FOR EVERY CORRECT ANSWER AND A PENALTY OF -1 MARKS WILL BE AWARDED FOR EACH WRONG ANSWER\n\n5.YOU ARE ALLOWED TO QUIT ANYTIME IN BETWEEN BY PRESSING 'Q' ON THE KEYBOARD WHEREIN YOUR FINAL SCORE OUT OF 120 WILL BE DISPLAYED\n\n\n\n\n\n\n\n\t\t\tALL THE BEST!!!\n\n");

temp=getchar(); clrscr(); printf("\n\n\n\n\n\n\n\n\t\t\t\t\tPHYSICS\n"); temp=getchar(); if(!kbhit()) clrscr(); printf("\n\n\n\n1.An electric dipole is placed at an angle of 30 deg to a non uniform electric field. The dipole will experience \n\nA. a torque as well as a translational force \n\nB. torque only \n\nC. translational force only in the direction of the field \n\nD. translational force only in the direction normal to the direction of field\n\n"); scanf("%c",&ch); ch=toupper(ch);

temp=getchar(); if(ch=='Q') { clrscr(); printf("\t\tYOUR FINAL SCORE\n\n\n\t\t%d",score); exit(1); }

else { if(ch=='A') score+=4; else score-=1; } clrscr(); printf("\n\n\n\n2.A particle located

You May Also Find These Documents Helpful

  • Satisfactory Essays

    cout << "You are in factorial program of C++. Please enter a +ve integer:- ";…

    • 426 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The -v option of the grep command displays only lines that do not contain the search pattern…

    • 604 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 Unit 7 Study Guide

    • 582 Words
    • 3 Pages

    2.Write a program to (a) display a “?” (b) read two decimal digits whose sum less than 10 (c) display them and their sum on the next line. Page: 80…

    • 582 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    On a separate page in your examination booklet, write the numbers 1 through 20 on separate lines down the page. For each of the 20 questions that follow, write the letter corresponding to the most correct answer (i.e. A, B, C, or D). Make sure you write the letter clearly. There is only one correct answer for each question. If you write more than one letter as your answer for a particular question, your answer will be marked incorrect.…

    • 3055 Words
    • 13 Pages
    Good Essays
  • Good Essays

    Objective C Paper

    • 936 Words
    • 4 Pages

    Slavery was a key factor in the growth of industry in the northern colonies which generated enormous amounts of weath in the new world. Slavery was important to the northern colonies for many economic reasons. The north was a huge supplier of goods and tools to the west indies. New England land owners thrived off of the trade of sugar from the Caribbean to make molasses and rum. The northern colonies supplied many ships to transport livestock and horses to the west indies for plantation owners and supplied these plantations with slaves making the northern economy completely reliant on slave trade.…

    • 936 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Bui (D2): 24-2

    • 1184 Words
    • 5 Pages

    Throughout this problem, use the following constants: c = 3 × 108 m/s e = 1.6 × 10−19 C 1 = 9 × 109 N · m2 /C2 . 4π 0 At time t2 = 2 × 10−9 s, what is the direction of the electric field at location A due to…

    • 1184 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Put your cursor over the “Online Student Edition” and you will get a roll-over menu:…

    • 253 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Cs Programming Chapter 1

    • 2450 Words
    • 10 Pages

    ____ data items may involve organizing or sorting them, checking them for accuracy, or performing calculations with them.…

    • 2450 Words
    • 10 Pages
    Satisfactory Essays
  • Good Essays

    Week 14 Hw 2

    • 1164 Words
    • 5 Pages

    The wingspan (tip – to – tip) of a Boeing 747 jetliner is 59 m. The plane is flying horizontally at a speed of 220 ms-1. The vertical component of the Earth’s magnetic field is 5.0 × 10-6 T. Find the emf induced between the wing’s tips. [6.49 × 10-2 V] Near San Francisco, where the vertically downward component of the earth’s magnetic field is 4.8 × 10-5 T, a car is travelling forward at 25 ms-1. An emf of 2.4 × 10-3 V is induced between the sides of the car. a. Which side of the car is positive, driver’s side or the passenger’s side? [driver’s (American’s drive on the left hand side)] b. What is the width of the car? [2 m] A metal rod (length = 0.75 m) moves perpendicular to a magnetic field of 0.15 T. An emf of 0.24 V exists between the ends of the rod. How far does the rod move in 7.0 s? [14.9 m] The axle of a railway carriage is 1.5 m long and is moving with a velocity of 20 ms-1 north on a level track. The vertically upward component of the Earth’s magnetic flux density is 50 µT. a. Calculate (in mV) the emf induced between the ends of the axle. [15. mV] b. Does the east of the west end of the axle gain an excess of electrons? [west] When in the swept back position, the wings of the RAF F111C fighter – bomber have a span of 21 m. With the wings in this position while flying horizontally due magnetic north in a region where the Earth’s magnetic flux density id 50 µT and the angle of dip is – 60°, the F111C develops a potential difference of 0.77 V between its wing tips. At what speed is the plane flying? [847 ms-1]…

    • 1164 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Week 2 Quiz Nov

    • 805 Words
    • 3 Pages

    Instructions: Select the correct answer for each question. You may use this worksheet to highlight the correct answer using the highlight function or simply create a Word Document, number from 1-15 and provide the correct letter for each corresponding question. Each question is worth .2 points.…

    • 805 Words
    • 3 Pages
    Good Essays
  • Good Essays

    INSTRUCTIONS: 1. Total Mark Value: 100 Number of questions: 7 2. 1 page (single-sided-letter-sized) notes are permitted. 3. Stand-alone-non-programmable calculators are permitted. 4. Budget your time carefully. 5. Answers are to be given in the space provided. However, should you require additional space for a complete answer, use the blank page attached for this purpose. 6. For all problems where calculation space is provided, show your reasoning and work. Unsubstantiated answers will usually receive no marks. 7. You are to stop writing immediately upon being told that the exam is over. The exam time includes the time to write your name. If you fail to stop immediately, a penalty will be applied. TOTAL MARKS Question 1 Question 2 Question 3 Question 4 Question 5 Question 6 Question 7 TOTAL 16 15 13 16 14 6 20 100 MARKS RECEIVED…

    • 2847 Words
    • 12 Pages
    Good Essays
  • Better Essays

    E-Commerce Exercise

    • 1068 Words
    • 5 Pages

    3. The String class ____ method evaluates the contents of two String objects to determine if they are equivalent.…

    • 1068 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    //casestudy 1 the drunken cockroach/*start of the program*/#include<stdio.h>#include<conio.h>#include<stdlib.h>#include<dos.h>void main(){int iteration,sizerow,sizecol,imove[8],jmove[8],k,ibug,jbug,a,b,legal=0,boundaryrow,boundarycol,move=0,count[40][40]={0};char tile[40][40];clrscr();printf("The Drunken Cockroach Simulator!\n");printf("Note:\nSometimes this cockroach steps on the already stepped tiles because its drunken");printf("\n'S' - stands for the starting point \n'C' - stands for the stepped tiles \n'Q' - stands for unwalkable tiles");printf("\nInput the size of the room you want (row,column): ");scanf("%d,%d",&sizerow,&sizecol);printf("Input the cockroach's starting point (row,column): ");scanf("%d,%d",&jbug,&ibug);printf("Input…

    • 93 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    physics

    • 5301 Words
    • 22 Pages

    d) Know and understand that if the resultant force acting on a stationary object is:…

    • 5301 Words
    • 22 Pages
    Good Essays
  • Good Essays

    Work

    • 815 Words
    • 3 Pages

    (d) Repeat the calculation if the applied force is exerted at an angle of 30.0° with the horizontal.…

    • 815 Words
    • 3 Pages
    Good Essays