C++ interview questions part 40

C++ interview questions part 40

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?

Correct Answer is : 5

2. Which operator is having the highest precedence?

Correct Answer is : Object pointer

3. What is this operator called ?:?

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

Correct Answer is : 12 21 31 32

5. What is the use of dynamic_cast operator?

Correct Answer is : 5 6 8 9 10

6. How many groups of output of operation are there in c++?

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.

Correct Answer is : [capture clause](parameters) -> return_type { body of the function }

8. What is meant by ofstream in c++?

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++?

Correct Answer is : 1

10. What must be specified when we construct an object of class ostream?

Correct Answer is : Error

11. Which of the following permits function overloading on c++?

Correct Answer is : Value of a: 10

12. In which of the following we cannot overload the function?

Correct Answer is : Error

13. Function overloading is also similar to which of the following?

Correct Answer is : memory heap

14. Overloaded functions are

Correct Answer is : All of the mentioned

15. What will happen while using pass by reference

Correct Answer is : use smart pointers & virtual destructor

16. What should be passed in parameters when function does not require any parameters?

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?

Correct Answer is : setrlimit()

18. What is meant by permutation in c++?

Correct Answer is : virtual memory

19. How the different permutations are ordered in c++?

Correct Answer is : pass by reference

20. Pick out the correct statement about permutation.

Correct Answer is : 3

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon