3
Q:

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;
        }

A) d99 B) d9d9
C) d9 D) compile time error

Answer:   A) d99



Explanation:

In this program, we have declared the values as integer instead of character, So it is printing as d99 but it will not arise an error.

Subject: C++
Q:

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

A) Public B) Inherited
C) Static D) None
 
Answer & Explanation Answer: C) Static

Explanation:

Static members are shared by all the instances of the class

Report Error

View Answer Report Error Discuss

Filed Under: C++

2 10161
Q:

Where is the reference stored?

A) stack B) heap
C) queue D) None
 
Answer & Explanation Answer: A) stack

Explanation:

Referencee is stored in stack

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3641
Q:

Default constructor accepts how many arguments?

A) one B) two
C) three D) None
 
Answer & Explanation Answer: D) None

Explanation:

Default constructors has no arguments

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3711
Q:

What could be the bucket size if collision and overlapping occur at same time?

A) 2 B) 0
C) 1 D) 4
 
Answer & Explanation Answer: C) 1

Explanation:

One. If there is only one entry possible in the bucket, when the collision occurs, there is no way to accommodate the colliding value. This results in the overlapping of values

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 4964
Q:

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

A) greater than 1 and less than -1 B) greater than -1 and less than 1
C) greater than 1 D) less than -1
 
Answer & Explanation Answer: A) greater than 1 and less than -1

Explanation:

Difference between the heights of left and Right subtrees in an AVL tree can never be greater than +1

Report Error

View Answer Report Error Discuss

Filed Under: C++

0 5559
Q:

In tree construction which is the suitable efficient data structure?

A) Array B) Linked list
C) Stack D) Queue
 
Answer & Explanation Answer: B) Linked list

Explanation:

Linked list is the efficient datastructure in tree construction

Report Error

View Answer Report Error Discuss

Filed Under: C++

7 16411
Q:

What are the methods are available in storing sequential files?

A) Natural merging B) Polyphase sort
C) Distribution of Initial runs D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

ll the above listed methods are used in storing sequential files

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3717
Q:

A binary tree with 7 nodes will have how many null branches?

A) 6 B) 7
C) 8 D) 5
 
Answer & Explanation Answer: C) 8

Explanation:

A binary tree with n nodes has exactly n+1 null nodes

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 4048