1
Q:

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

A) 252 B) 253
C) 254 D) 262

Answer:   A) 252



Explanation:

In this program, We are dividing the values of a and b, printing it.

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 10157
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 3640
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 3704
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 4951
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 5538
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++

5 16306
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 3706
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 4039