New ! Computer Science MCQ Practise Tests



Polymorphism Model Question Paper

11th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 02:00:00 Hrs
Total Marks : 50
    7 x 1 = 7
  1. Which of the following refers to a function having more than one distinct meaning?

    (a)

    Function Overloading

    (b)

    Member overloading

    (c)

    Operator overloading

    (d)

    Operations overloading

  2. Which of the following reduces the number of comparisons in a program?

    (a)

    Operator overloading

    (b)

    Operations overloading

    (c)

    Function Overloading

    (d)

    Member overloading

  3. Which of the following is invalid prototype for function overloading

    (a)

    void fun (intx);
    void fun (char ch);

    (b)

    void fun (intx);
    void fun (inty);

    (c)

    void fun (double d);
    void fun (char ch);

    (d)

    void fun (double d);
    void fun (inty);

  4. Which of the following operator is by default overloaded by the compiler?

    (a)

    *

    (b)

    +

    (c)

    +=

    (d)

    ==

  5. #include< iostream >
    using namespace std;
    class Point {
    private:
    int x, y;
    public:
    point(int x1,int y1)
    {
    x=x1;y=y1;
    }
    void operator+(Point&pt3);
    void showO {cout << "x=" << x << " ,y=" << y;}
    };
    void Point::operator+(point &pt3)
    {
    x + =pt3.x;
    y+=pt3.y;
    }
    int main ()
    {
    point ptl(3,2),pt2(5,4);
    pt1+pt2;
    pt1.show ();
    return 0;
    }
    Which of the following statement invoke operator overloading?

    (a)

    pt1+pt2

    (b)

    Pointpt1(3,2),pt2(5,4)

    (c)

    pt1.showt);

    (d)

    return 0;

  6. How many type OS overloading are there in C++?

    (a)

    3

    (b)

    4

    (c)

    only one

    (d)

    2

  7. The number and types of a function's parameter are called ________.

    (a)

    overload resolution

    (b)

    overloaded function

    (c)

    function's signature

    (d)

    function's prototype

  8. 9 x 2 = 18
  9. What is function overloading?

  10. List the operators that cannot be overloaded.

  11. Does the return type of a function help in overloading a function?

  12. What is the use of overloading a function?

  13. What is overloaded function?

  14. Define polymorphism.

  15. What is functions signature?

  16. What is overload resolution?

  17. Give the syntax for operator overloading.

  18. 5 x 3 = 15
  19. What are the rules for function overloading?

  20. What is operator overloading? Give some example of operators which can be overloaded.

  21. Discuss the benefits of constructor overloading?

  22. Write a short note on operator overloading.

  23. What is function signature?

  24. 2 x 5 = 10
  25. What are the rules for operator overloading?

  26. Debug the following program
    #include < iostream >
    using namespace std;
    class String
    {
    public:
    charstr[20];
    public:
    void accept_string
    {
    cout << "\n Enter String : ";
    cin>>str;
    }
    display_string()
    {
    cout< }
    String operator *(String x) //Concatenating String
    {
    String s;
    strcat(str,str);
    strcpy(s.str,str);
    goto s;
    }
    }
    int main()
    {
    String str1, str2, str3;
    str1.accept_string();
    str2.accept_string();
    cout << "\n\n First String is : ";
    str1=display_string();
    cout << "\n\n Second String is : ";
    str2.display_string();
    str3=str1+str2;
    cout>>"\n\n Concatenated String is : ";
    str3.display_string();
    return 0;
    }

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

Reviews & Comments about 11th Standard Computer Science - Polymorphism Model Question Paper

Write your Comment