JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
C++ interview questions part 7
C++ interview questions part 7
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. What will happen when introduce the interface of classes in a run-time polymorphic hierarchy?
A. Steve jo
B. Steve jobs
C. Steve
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Steve
2. Which classes are called as mixin?
A. Returns a different value
B. They are same
C. Returns a different value but they are same
D. None of the mentioned
Show Correct Answer
Correct Answer is :
They are same
3. What is the use of clog?
A. 1
B. 2
C. 1 or 2
D. 2
Show Correct Answer
Correct Answer is :
1 or 2
4. How many types of guarantees are there in exception class can have?
A. 1
B. 2
C. 3
D. 4
Show Correct Answer
Correct Answer is :
3
5. Which operator is used to create the user-defined streams in c++?
A. bitset
b;
B. bitset
b(12);
C. bitset
b(string(“1100”));
D. all of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
6. What does the cerr represent?
A. bitset
b;
B. bitset
b(12);
C. bitset
b(string(“1100”));
D. bitset
b(float(12));
Show Correct Answer
Correct Answer is :
bitset
b(12);
7. What is the class relationship?
A. bitset
b;
B. bitset
b(12);
C. bitset
b(string(“1100”));
D. bitset
b(float(12));
Show Correct Answer
Correct Answer is :
bitset
b(string(“1100”));
8. How many types of class relationships are there?
A. All bits are 0
B. All bits are 1
C. Leftmost bit is 0
D. Rightmost bit is 0
Show Correct Answer
Correct Answer is :
All bits are 0
9. Which type of relationship is modelled by Inheritance?
A.
B.
C.
D.
Show Correct Answer
Correct Answer is :
10. How the relationship is made in Association?
A. 1111
B. 1111
C. 11110000
D. 1111
Show Correct Answer
Correct Answer is :
1111
11. How many types of Association can be there between classes?
A. 1111
B. Compile-time error
C. 11110000
D. Run-time error
Show Correct Answer
Correct Answer is :
Run-time error
12. Why do we need relationships between classes?
A. leftmost bit
B. rightmost bit
C. same as in an array
D. front
Show Correct Answer
Correct Answer is :
rightmost bit
13. Composition is also a type of _______________ relationship.
A. To count the number of 0’s
B. To count the number of 1’s
C. To count the number of total bits in a bitset
D. To count the number of low bits
Show Correct Answer
Correct Answer is :
To count the number of 1’s
14. Which type of relationship is modelled by Composition?
A. To count the number of 0’s
B. To count the number of 1’s
C. To count the number of total bits used by bitset variable
D. To count the number of low bits
Show Correct Answer
Correct Answer is :
To count the number of total bits used by bitset variable
15. Which type of relationship is modelled by Aggregation?
A. 1
B. 0
C. 10
D. 11
Show Correct Answer
Correct Answer is :
1
16. Which of the following relationships is uni-directional?
A. Returns true if the number of 1’s equal to the number of 0’s
B. Returns true if any bit is set 0
C. Returns true if any bit is set 1
D. Returns true only if all bits are 1
Show Correct Answer
Correct Answer is :
Returns true if any bit is set 1
17. In which of the following relationship objects of related classes can occur independently?
A. Returns true if any bits is set 1
B. Returns true if all bits is set 0
C. Returns true if the number of 1’s equal to the number of 0’s
D. Returns true only if all bits are 1
Show Correct Answer
Correct Answer is :
Returns true if all bits is set 0
18. In which of the following relationship objects of related classes are strongly dependent?
A. 1
B. 0
C. 10
D. 11
Show Correct Answer
Correct Answer is :
1
19. Composition is a __________ type of Association relationship.
A. Used to make alternate bits zero
B. Used to make a bit 0 in a bitset
C. Used to make all bits zero
D. Used to set bit(s) in a bitset
Show Correct Answer
Correct Answer is :
Used to set bit(s) in a bitset
20. Aggregation is a __________ type of Association relationship.
A. All alternate bits are set to 1 in a bitset
B. All bits are set to 0 in a bitset
C. All bits are set to 1 in a bitset
D. First bit is set to 1
Show Correct Answer
Correct Answer is :
All bits are set to 1 in a bitset
Similar Interview Questions
Search for latest jobs
Find Jobs