New ! Computer Science MCQ Practise Tests



11th First Revision Test 2019 Question Answer

11th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 02:30:00 Hrs
Total Marks : 70
    15 x 1 = 15
  1. To convert an octal number of binary equivalent, each octal digit is expressed as _______.

    (a)

    3 bits form

    (b)

    4 bits form

    (c)

    8 bits form

    (d)

    2 bits form

  2. Which is the fastest memory?

    (a)

    Hard disk 

    (b)

    Main memory

    (c)

    Cache memory

    (d)

    Blue-Ray disc

  3. Identify the usage of Operating Systems

    (a)

    Easy interaction between the human and computer

    (b)

    Controlling Input & Output Devices

    (c)

    Managing use of main memory

    (d)

    All the above

  4. Which of the following is located at the top of the screen?

    (a)

    Task bar

    (b)

    Scroll bar

    (c)

    Tool bar

    (d)

    Menu bar

  5. Ensuring the input-output relation is

    (a)

    the responsibility of the algorithm and the right of the user.

    (b)

    the responsibility of the user and the right of the algorithm.

    (c)

    the responsibility of the algorithm but not the right of the user.

    (d)

    the responsibility of both the user and the algorithm.

  6. Using this recursive definition
    \(a^n= \begin{cases}1 & \text { if } n=0 \\ a \times a^{n-1} & \text { otherwise }\end{cases}\)
    how many multiplications are needed to calculate a10?

    (a)

    11

    (b)

    10

    (c)

    9

    (d)

    8

  7. Which operator denotes shift right bitwise?

    (a)

    >>

    (b)

    <<

    (c)

    &

    (d)

    !

  8. Which of the following is called entry control loop?

    (a)

    do-while

    (b)

    for

    (c)

    while

    (d)

    if-else

  9. Which of the following is a way that the arguments can be passed to a function?
    (i) call by value
    (ii) call by reference
    (iii) call by address

    (a)

    only (i)

    (b)

    (i), (ii) and (iii)

    (c)

    (ii), (iii)

    (d)

    only (ii)

  10. Which of the following cannot be a structure member?

    (a)

    Another structure

    (b)

    Function

    (c)

    Array

    (d)

    variable of double datatype

  11. The term is used to describe a programming approach based on classes and objects is

    (a)

    OOP

    (b)

    POP

    (c)

    ADT

    (d)

    SOP

  12. Which of the following statement is ture or false?

    (i) void getvalue ( )
    {
    =
    }
    //member function initializes the class object
    (ii) Data dl; //object declaration
    (iii) int num; //variable declaration
    (iv) s1.getvalue( ) //member function
    (a)

    i-true, ii-false, iii-false, iv-true

    (b)

    i-false, ii-false, iii-true, iv-true

    (c)

    i-false, ii-true, iii-true, iv-false

    (d)

    i-true, ii-true, iii-false, iv-false

  13. Which of the following provides flexibility of creating multiple type of objects for a class?

    (a)

    function overloading

    (b)

    operator overloading

    (c)

    constructor overloading

    (d)

    object overloading

  14. class vehicle
    { int wheels;
    public:
    void input_data(float,float);
    void output_data();
    protected:
    int passenger;
    };
    class heavy_vehicle : protected vehicle {
    int diesel_petrol;
    protected:
    int load;
    public:
    void read_data(float,float)
    void write_data(); };
    class bus: private heavy_vehicle {
    char Ticket[20];
    public:
    void fetch_data(char);
    void display_data(); };
    The data member that can be accessed from the function display data() 

    (a)

    passenger

    (b)

    load

    (c)

    Ticket

    (d)

    All of these

  15. Which of the following are portal or website of books collection?

    (a)

    E-Papers

    (b)

    E-Commere

    (c)

    E-languages

    (d)

    E-libraries

  16. 6 x 2 = 12
  17. What is the function of an ALU?

  18. What is MDR?

  19. List out different distributions of Linux operating system.

  20. How do we refine a statement?

  21. What is the relationship between loop invariant, loop condition and the input-output recursively?

  22. Write a short note on const keyword with an example.

  23. Write the output of the following program.

    #include < string.h >
    #include < iostream >
    using namespace std;
    intmain()
    {
    char string 1[] = "Computer";
    char string2[] = "Science";
    int result;
    result = strcmp(string1,string2);
    if(result 0)
    {
    cout=x'' String 1 : " << string 1<< " and String2"
    }
    if (result<0)
    {
    cout << " String 1 :" << string1<< " and String2
    " << string2 << " Are Not Equal";
    }
    }

  24. Differentiate structure and class though both are user defined data type.

  25. Define Phishing.

  26. 6 x 3 = 18
  27. Convert the following if-else to a single conditional statement:
    if (x > = 10)
    a = m + 5;
    else
    a = m;

  28. What is called anonymous structure. Give an example

  29. List some of the features of modular programming.

  30. class sale ( int cost, discount ;public: sale(sale &); Write a non inline definition for constructor specified;

  31. Write the output of the following program.
    //Implementation of Single Inheritance using public
    visibility mode
    #include < iostream >
    using namespace std;
    class Shape
    {
    private:
      int count;
    protected:
      int width;
      int height;
    public:
      void setWidth(int w)
      {
      width=w;
      }
    void setHeight(int h)
    {
    height=h;
    }
    };
    class Rectangle: publicShape
    {
    public:
    int getArea()
    {
    return (width * height);
    }
    };
    int main()
    {
    Rectangle Rect;
    Rect.setWidth( 5);
    Rect.setHeight(7);
    II Print the area of theobject.
    cour<< "Total area: "<< Rect.getArea() << endl;
    return ();
    }

  32. Give the truth table of XOR gate

  33. What is protected by the security modules of an OS?

  34. How is state represented in algorithms?

  35. Draw a flowchart for alternative control flow.

  36. 5 x 5 = 25
    1. Explain booting of computer and its types.

    2. Explain the characteristics of a microprocessor.

    1. Explain the elements of Ubuntu.

    2. Circulate the contents: Write the specification and construct an algorithm to circulate the contents of the variables A, B and C as shown below: The arrows indicate that B gets the value of A, C gets the value of B and A gets the value of C.

    1. Write a program to find the LCM and GDC of two numbers.

    2. What is Recursion? Write a program to find the factorial of the given number using recursion.

    1. Write a c++ program to declare and accept an array of professors. Display the details of the department = ”COMP.SCI” and the name of the professors start with ‘A’. The structure “college” should contain the following members.
      prof_id as integer
      name and Department as character array

    2. Write the output for the following program.
      #include < iostream >
      using namespcae std;
      class Test
      {
      private:
      intX;
      intY;
      public:
      Test (int, int); //parameterized constructor declaration
      Test (Test &); //Declaration of copy constructor to initialize data members.
      void Display( );
      };//End of class
      Test:: Test(int a, int b) //Definition of parameterized constructor.
      {
      X=a;
      Y=b;
      }
      Thet: :Test(Test &T) //Definition of copy constructor
      {
      X=T.X:
      Y=T.Y;
      }
      void Test:: Displayt// !Definition of Display ( ) member function
      {
      cout << endl << "X; " << X;
      cout << endl << "Y; " << Y << endl;
      }
      int main ( )
      {
      Test Tl (10,20);/ /Parameterized Constructor automatically called when //object is created.
      cout << endl << "T1 Object:" << endl;
      cout << "Value after initialization: "
      T1.Display( );
      Test T2(T1);//Initalize object with other object using copy constructor
      cout << endl << "T2 Object:" << endl;
      cout << "Value after initialization: "
      T2.Display( );
      return 0;
      }

    1. Answer the questions based on the following program
      #include < iostream >
      #include < string.h >
      using namespace std;
      class comp {
      public:
      char s[10];
      void getstring(char str[10])
      {
      strcpy(s,str);
      }
      void operator==(comp);
      };
      void comp::operator==(comp ob)
      {
      if(strcmp(s,ob.s)==0)
      cout << "\nStrings are Equal";
      else
      cout << "\nStrings are not Equal";
      }
      int main()
      {
      comp ob, ob1;
      char string1[10], string2[10];
      cout << "Enter First String:";
      cin>>string1;
      ob.getstring(string1);
      cout << "\nEnter Second String:";
      cin >> string2;
      ob1.getstring(string2);
      ob==ob1;
      return 0;
      }
      (i) Mention the objects which will have the scope till the end of the program.
      (ii) Name the object which gets destroyed in between the program
      (iii) Name the operator which is over loaded and write the statement that invokes it.
      (iv) Write out the prototype of the overloaded member function
      (v) What types of operands are used for the overloaded operator?
      (vi) Which constructor will get executed? Write the output of the program.

    2. A railway reservation counter needs to computerise its reservation process. Using the following information write a C ++ program to do so:
      class Train {
      int number; //Train number
      int seats _1; //Total seats in 1st class
      int seats _2 ; //Total seats in 2nd class
      int seats _3; //Total seats in 3rd class
      public;
      Train (int i, int j, int k, int l)
      {
      number = i; seats_1 =j ;
      seats-2 =' k;,seats-3 = 1,.
      }
      int getnum(void)
      { return number; }
      int getseats_1(void)
      { return seats_1 ; }
      int getseats_2(void)
      { return seats _2 ;}
      int getseats - 3 (void)
      {return seats - 3:}
      };
      class Reservation : public Train
      { int bkd_1 ; //Seats reserved in 1st class
      int bkd_2 ; ///Seats reserved in 2nd class
      int bkd_3 ; ///Seats reserved in 3rd class
      public:
      int i, j, k, 1;
      Reservation (int i, int j, int k, int 1) : Train (i ,j, k,l)
      {bkd_1 = bkd_2 = bkd_3 = 0 ; }
      void book(char type, int num);
      void cancel (char type, int num) ;
      void disp_status (void);
      };
      void Reservation: : book (char type, int num)
      { switch(type)
      }
      case '1': bkd_1+=num; //addnum to bkd_1
      break;
      case '2': bkd_2+=num; //addnum to bkd_2
      break ;
      case '3': bkd_3+=num; Iladdnum to bkd_3
      break;
      default: cout <<"Wrong class\n";
      }
      }
      void Reservation: : cancel (char type. int num)
      { switch(type)
      }
      case '1': bkd_1-=num;
      break;
      case '2': bkd_2-=num;
      break ;
      case '3' : bkd_3-=num;
      break ;
      default: cout <<"Wrong class\n" ;
      }
      }
      void Reservation : : disp_stauts (void)
      {
      cout <<"\t\t Train Numbe r: "< cout <<"Class\t Total seats\t Reserved \t
      Unreserved\n" ;
      int val;
      val = getseats_1 () ;
      cout<< "I\t "< xval << "\t "<< bkd_1<< "
      \t "<< val-bkd_1 << "\n";​​​​​​​
      val = getseats_2 () ;
      cout << "2\t "<< val << "\t "< xbkd 2 << "​​​​​​​​​​​​​​
      \t "<< val-bkd_2 << "\n";​​​​​​​
      val = getseats_3 ( ) ;​​​​​​​
      cout << "3\t "<< val << "\t "<< bkd 3 << "​​​​​​​
      \t "<< val-bkd_3 << "\n";​​​​​​​

*****************************************

Reviews & Comments about 11th Standard Computer Science Revision Test 2019 Question Paper

Write your Comment