Skip to content

Paper II · Unit 3: Programming Languages and Computer Graphics

Programming in C++

Programming in C++ is a topic inside Unit 3 (Programming Languages and Computer Graphics) of UGC NET Computer Science and Applications, Paper II (code 87). GateIQ has published 46 questions classified under this topic — 14.4% of everything recorded in this unit, and 46 of them carry a written solution.

What this topic covers

Tokens, Identifiers, Variables and Constants; Data types, Operators, Control statements, Functions Parameter Passing, Virtual Functions, Class and Objects; Constructors and Destructors; Overloading, Inheritance, Templates, Exception and Event Handling; Streams and Files; Multifile Programs

Syllabus wording above is the official heading for this topic; the question counts are GateIQ’s own classification of its published archive.

Try Programming in C++ PYQs free

Attempt the 5 most recent published questions on this topic right here, with the published answer and explanation after each check. No account is needed and nothing is saved. Practice tracking and analytics are part of UGC IQ.

0 of 5 checked
  1. 1Previous year question

    Which of the following statements are true regarding C++\text{C++}?

    1. Overloading gives the capability to an existing operator to operate on other data types
    2. Inheritance in object oriented programming provides support to reusability
    3. When object of a derived class is defined, first the constructor of derived class is excecuted then constructor of a base class is executed
    4. Overloading is a type of polymorphism

    Choose the correct option from those given below:

    Choose an option to check it.
  2. 2Previous year question

    Consider the following C++ function f():

    unsigned int f(unsigned int n) {
        unsigned int b=0;
        while (n) {
            b+=n & 1;
            n>>1;
        }
    return b;
    }

    The function f() returns the int that represents the ____P____ in the binary representation of positive integer n, where P is

    Choose an option to check it.
  3. 3Previous year question

    Let AA be the base class in C++\text{C++} and BB be the derived class from AA with protected inheritance. Which of the following statement is false for class BB?

    Choose an option to check it.
  4. 4Previous year question

    Given below are three implementations of the swap()\text{swap()} function in C++\text{C++} :

    \begin{array}{|l|l|l|} \hline \qquad \qquad \text{(a)} & \qquad \qquad \text{(b)} & \qquad \qquad \text{(c)} \\ \text{void swap (int a, int b)} & \text{void swap (int &a, int &b)} & \text{void swap (int *a, int *b)} \\ \text{\{} & \text{\{} & \text{\{} \\ \text{int temp;} & \text{int temp;} & \text{int *temp;} \\ \text{temp = a;} & \text{temp = a;} & \text{temp = a;} \\ \text{a = b;} & \text{a = b;} & \text{a = b;} \\ \text{b = temp;} & \text{b = temp;} & \text{b = temp;} \\ \text{\}} & \text{\}} & \text{\}} \\ \text{int main()} & \text{int main()} & \text{int main()} \\ \text{int p = 0,q = 1;} & \text{int p = 0, int q = 1;} & \text{int p = 0 , q = 1;} \\ \text{swap(p,q);} & \text{swap(p,q);} &\text{swap(p,q);} \\ \text{\}} & \text{\}} & \text{\}}\\\hline \end{array}

    Which of these would actually swap the contents of the two integer variables p\text{p} and q\text{q}?

    Choose an option to check it.
  5. 5Previous year question

    Consider the following two C++C++ programs P1P1 and P2P2 and two statements S1S1 and S2S2 about these programs:

    P1P1 P2P2

    void f(int a, int *b, int &c)

    {

    a=1;

    *b=2;

    c=3;

    }

    int main()

    {

    int i=0;

    f(i, &i, i);

    count <<i;

    }

    double a=1, b=2;

    double &f(double &d)

    {

    d=4;

    return b;

    }

    int main()

    {

    f(a)=5;

    count < < a< < “:” < < b;

    }

    S1S1 : P1P1 prints out 3.3.

    S2S2 : P2P2 prints out 4:24:2

    What can you say about the statements S1S1 and S2S2?

    Code:Code:

    Choose an option to check it.

41 more questions on Programming in C++

These 5 are free to try without an account. The rest of the published questions on Programming in C++ are part of UGC IQ: see what it includes, or create an account to get started.

Programming in C++: questions people ask

How many UGC NET Computer Science questions are asked on Programming in C++?

GateIQ has published 46 UGC NET Computer Science previous year questions on Programming in C++, and 46 of them carry a written solution. That is 14.4% of the questions in Unit 3, Programming Languages and Computer Graphics.

Which unit of UGC NET Computer Science Paper 2 is Programming in C++ in?

Programming in C++ is a topic of Unit 3, Programming Languages and Computer Graphics, in Paper II (Computer Science and Applications, code 87).

Can I practise Programming in C++ PYQs for free?

Yes. The 5 most recent published questions on this topic are free on this page with no signup, and each shows the published answer with its explanation. The full archive, practice tracking and analytics are part of UGC IQ.

Related topics in Unit 3

Full syllabus · Paper II overview