JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
C++ interview questions part 40
C++ interview questions part 40
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which operator is having the right to left associativity in the following?
A. 2
B. 4
C. 5
D. 3
Show Correct Answer
Correct Answer is :
5
2. Which operator is having the highest precedence?
A. Memory pointer
B. Object pointer
C. Class pointer
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Object pointer
3. What is this operator called ?:?
A. Design pattern
B. Sequence pattern
C. Adapter pattern
D. All of the mentioned
Show Correct Answer
Correct Answer is :
Design pattern
4. What is the output of this program? #include
using namespace std; int main() { int a; a = 5 + 3 * 5; cout << a; return 0; }
A. 12 21 32 31
B. 12 21 31 32
C. 12044
D. 11678
Show Correct Answer
Correct Answer is :
12 21 31 32
5. What is the use of dynamic_cast operator?
A. 5 6 7 8 9
B. 5 6 8 9 10
C. 6 7 8 9 10
D. None of the mentioned
Show Correct Answer
Correct Answer is :
5 6 8 9 10
6. How many groups of output of operation are there in c++?
A. A technique of C++ that allows us to write inline functions without a name
B. A technique of C++ that allows us to write overloaded functions
C. A technique of C++ that allows us to write functions that are called more than once
D. A technique of C++ that allows us to write functions without parameters
Show Correct Answer
Correct Answer is :
A technique of C++ that allows us to write inline functions without a name
7. Pick out the correct objects about the instantiation of output stream.
A. [capture clause](parameters) -> return_type { body of the function }
B. [parameters](capture clause) -> return_type { body of the function }
C. [parameters:capture clause]() -> return_type { body of the function }
D. [capture clause:parameters]() -> return_type { body of the function }
Show Correct Answer
Correct Answer is :
[capture clause](parameters) -> return_type { body of the function }
8. What is meant by ofstream in c++?
A. The return type of lambda expression can be neglected in some cases
B. The return type of lambda expression must be specified in all cases
C. Lambda expression should be very large functions
D. Lambda expression is also available in C
Show Correct Answer
Correct Answer is :
The return type of lambda expression can be neglected in some cases
9. How many types of output stream classes are there in c++?
A. 0
B. 1
C. Error
D. Segmentation fault
Show Correct Answer
Correct Answer is :
1
10. What must be specified when we construct an object of class ostream?
A. Value of a: 5
B. Value of a: 10
C. Error
D. Segmentation fault
Show Correct Answer
Correct Answer is :
Error
11. Which of the following permits function overloading on c++?
A. Value of a: 5
B. Value of a: 10
C. Error
D. Segmentation fault
Show Correct Answer
Correct Answer is :
Value of a: 10
12. In which of the following we cannot overload the function?
A. Value of a: 5
B. Value of a: 10
C. Error
D. Segmentation fault
Show Correct Answer
Correct Answer is :
Error
13. Function overloading is also similar to which of the following?
A. memory heap
B. stack
C. queue
D. none of the mentioned
Show Correct Answer
Correct Answer is :
memory heap
14. Overloaded functions are
A. Find a way to work with the data one at a time
B. Declare it in program memory, instead of on the stack
C. Use the hard drive, instead of RAM
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
15. What will happen while using pass by reference
A. use smart pointers
B. use raw pointers
C. use virtual destructor
D. use smart pointers & virtual destructor
Show Correct Answer
Correct Answer is :
use smart pointers & virtual destructor
16. What should be passed in parameters when function does not require any parameters?
A. 10MB
B. 500MB
C. 1GB
D. Size of the heap memory is limited by the size of the RAM and the swap memory
Show Correct Answer
Correct Answer is :
Size of the heap memory is limited by the size of the RAM and the swap memory
17. What are the advantages of passing arguments by reference?
A. setrlimit()
B. unlimit()
C. both setrlimit() & unlimit()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
setrlimit()
18. What is meant by permutation in c++?
A. ram
B. secondary memory
C. virtual memory
D. none of the mentioned
Show Correct Answer
Correct Answer is :
virtual memory
19. How the different permutations are ordered in c++?
A. pass by value
B. pass by reference
C. both pass by value & reference
D. none of the mentioned
Show Correct Answer
Correct Answer is :
pass by reference
20. Pick out the correct statement about permutation.
A. 1
B. 2
C. 3
D. 4
Show Correct Answer
Correct Answer is :
3
Similar Interview Questions
Search for latest jobs
Find Jobs