PREVIOUS YEAR SOLVED PAPERS MCQ - JULY 2016 Paper 2

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

= x * y < i + j || k
= 0.5 * 0.0 < 0 + 1 || -1
= 0.0 < 0 + 1 || -1
= 0.0 < 1 || -1
= 1 || -1
= 1
So, option (C) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption A
Rate difficulty Rate difficulty:
Choose a difficulty.
Found this useful?
Follow:

int (*f())[ ]; declares a function returning a pointer to an array of integers.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption B
Rate difficulty Rate difficulty:
Choose a difficulty.
  • When a class grants friend status to another class then all member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship.
  • The member functions of the class generating friendship can access the members of the friend class.Incorrect statement.
  • Class friendship is not reciprocal to each other.
  • So, option (B) is correct.
    Cancel reply

    Your email address will not be published. Required fields are marked *


    Cancel reply

    Your email address will not be published. Required fields are marked *

    Correct AnswerOption D
    Rate difficulty Rate difficulty:
    Choose a difficulty.
  • When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass overrides the method in the superclass.
  • Overloading allows different methods to have same name, but different signatures where signature can differ by number of input parameters or type of input parameters or both. Overloading is related to compile time (or static) polymorphism..
  • Friend Class A friend class can access private and protected members of other class in which it is declared as friend..
  • The capability of a class to derive properties and characteristics from another class is called Inheritance.
  • So, option (D) is correct.
    Cancel reply

    Your email address will not be published. Required fields are marked *


    Cancel reply

    Your email address will not be published. Required fields are marked *

    Correct AnswerOption A
    Rate difficulty Rate difficulty:
    Choose a difficulty.

    We have function:
    int f (int n)
    { if (n = = 0) then return n;
    else
    return n + f(n-2);
    }
    we have to find output for n = 100 i.e int f (100) { if (n = = 0) then return n; //failure// else return 100 + f (98) { if (n = = 0) then return n; //failure// else return 98 + f (96) { if (n = = 0) then return n; //failure// else return 96 + f (94).......................f(0);// It will be a AP series of 100 , 98, 96,.........0// ; }; }; } Sum of series when we know first and last term and no of terms: Sn = n / 2 * (first term + last term) i.e. 51 / 2 * (100 + 0). = 51 * 50 = 2550. So, option (A) is correct.
    Cancel reply

    Your email address will not be published. Required fields are marked *


    Cancel reply

    Your email address will not be published. Required fields are marked *

    Why Practice with Avatto?
    High Quality MCQsExam-focused questions with accurate answers
    Detailed ExplanationsStep-by-step explanations to enhance learning
    Latest Exam PatternBased on updated syllabus and pattern
    Performance AnalyticsTrack performance and improve weak areas
    100% Free PracticePractice unlimited questions for free