Q.1

How many kinds of entities are directly parameterized in c++?

  • 1
  • 2
  • 3
  • 4
Q.2

What is the output of this program?

#include
        using namespace std;
        struct sec {
            int a;
            char b;
        };
        int main()
        {
            struct sec s ={25,50};
            struct sec *ps =(struct sec *)&s;
            cout << ps->a << ps->b;
            return 0;
        }

  • 252
  • 253
  • 254
  • 262
Q.3

What is the output of this program ?

       #include
        using namespace std;
        int n(char, int);
        int (*p) (char, int) = n;
        int main()
        {
            (*p)('d', 9);
            p(10, 9);
            return 0;
        }
        int n(char c, int i)
        {
            cout << c <<  i;
            return 0;
        }

  • d99
  • d9d9
  • d9
  • compile time error
Q.4

What is the output of this program?

#include
        using namespace std;
        void fun(int x, int y)
        {
            x = 20;
            y = 10;
        }
        int main()
        {
            int x = 10;
            fun(x, x);
            cout << x;
            return 0;
        }

  • 10
  • 20
  • compile time error
  • none of these
Q.5

What is the output of this program?

 #include
       using namespace std;
       int main()
       {
           int arr[] = {4, 5, 6, 7};
           int *p = (arr + 1);
           cout << arr;
           return 0;
       }

  • 4
  • 5
  • address of arr
  • 7
Q.6

What is meaning of following declaration?
int(*p[5])();

  • p is pointer to function.
  • p is array of pointer to function.
  • p is pointer to such function which return type is array.
  • p is pointer to array of function.
Q.7

Which of the following is a properly defined structure?

  • struct {int a;}
  • struct a_struct {int a;}
  • struct a_struct int a;
  • struct a_struct {int a;};
Q.8

Which of the following gives the memory address of the first element in array?

  • array[0];
  • array[1];
  • array(2);
  • array;
Q.9

Which is more effective while calling the functions?

  • call by value
  • call by reference
  • call by pointer
  • none
Q.10

What is the default return type of a function ?

  • int
  • void
  • float
  • char
Q.11

In tree construction which is the suitable efficient data structure?

  • Array
  • Linked list
  • Stack
  • Queue
Q.12

What is the general syntax for accessing the namespace variable?

  • namespaceid::operator
  • namespace,operator
  • namespace#operator
  • none of the mentioned
Q.13

Which of the following type casts will convert an Integer variable named amount to a Double type ?

  • (int to double) amount
  • int (amount) to double
  • int to double(amount)
  • (double) amount
Q.14

Which of the following is not a correct variable type?

  • real
  • char
  • float
  • double
Q.15

Which operator is used in catch-all handler?

  • ellipses operator
  • ternary operator
  • string operator
  • unary operator
Q.16

In an AVL tree the balancing is to be done when the pivotal value is in range of

  • greater than 1 and less than -1
  • greater than -1 and less than 1
  • greater than 1
  • less than -1
Q.17

which keyword is used to define the macros in c++?

  • macro
  • define
  • #define
  • none of these
Q.18

What do vectors represent?

  • Static arrays
  • Dynamic arrays
  • Stack
  • Queue
Q.19

Which is also called as abstract class?

  • virtual function
  • pure virtual function
  • derived class
  • None of these
Q.20

Which of the following type of data member can be shared by all instances of its class?

  • Public
  • Inherited
  • Static
  • None
0 h : 0 m : 1 s