JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
C++ interview questions part 23
C++ interview questions part 23
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. which of the following is used to terminate the function declaration?
A. k
B. l
C. error
D. runtime error
Show Correct Answer
Correct Answer is :
k
2. How many can max number of arguments present in function in the c99 compiler?
A. 1234
B. 4321
C. 1423
D. 1342
Show Correct Answer
Correct Answer is :
1342
3. Which is more effective while calling the functions?
A. 1
B. 2
C. 3
D. 4
Show Correct Answer
Correct Answer is :
3
4. What is the scope of the variable declared in the user defined function?
A. A derived class’s constructor cannot explicitly invokes its base class’s constructor
B. A derived class’s destructor cannot invoke its base class’s destructor
C. A derived class’s destructor can invoke its base class’s destructor
D. None of the mentioned
Show Correct Answer
Correct Answer is :
A derived class’s destructor cannot invoke its base class’s destructor
5. How many minimum number of functions should be present in a C++ program for its execution?
A. members
B. functions
C. both members & functions
D. none of the mentioned
Show Correct Answer
Correct Answer is :
both members & functions
6. What does the function objects implement?
A. 54.3R
B. R4.35
C. 4.3R5
D. None of the mentioned
Show Correct Answer
Correct Answer is :
54.3R
7. What are the two advantage of function objects than the function call?
A. 45355
B. 45385
C. 4
D. 3
Show Correct Answer
Correct Answer is :
45385
8. Which header is need to be used with function objects?
A. Instantiating Base
B. Instantiating Base
C. Instantiating Base
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Instantiating Base
9. Which are instances of a class with member function operator() when it is defined?
A. Overriding refers to a derived class function that has the same name and signature as a base class virtual function
B. Overriding has different names
C. Overriding refers to a derived class
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Overriding refers to a derived class function that has the same name and signature as a base class virtual function
10. How many parameters does a operator() in a function object shoud take?
A. 1
B. 2
C. 3
D. 4
Show Correct Answer
Correct Answer is :
2
11. What is a function template?
A. 1
B. 2
C. 3
D. 4
Show Correct Answer
Correct Answer is :
3
12. Which is used to describe the function using placeholder types?
A. 10
B. 4
C. 40
D. None of the mentioned
Show Correct Answer
Correct Answer is :
40
13. What can be passed by non-type template parameters during compile time?
A. enumerators are constants
B. enumerators are user-defined types
C. enumerators are same as macros
D. enumerator values start from 0 by default
Show Correct Answer
Correct Answer is :
enumerators are same as macros
14. From where does the template class derived?
A. string
B. integer
C. float
D. none of the mentioned
Show Correct Answer
Correct Answer is :
integer
15. What are Templates in C++?
A. integer
B. negative
C. enumerator
D. all of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
16. In how many ways templates concept can be used?
A. it will not allocate memory
B. it will allocate memory
C. it will not allocate memory to its variables
D. none of the mentioned
Show Correct Answer
Correct Answer is :
it will not allocate memory
17. What is the difference between normal function and template function?
A. int variable
B. float variable
C. string variable
D. none of the mentioned
Show Correct Answer
Correct Answer is :
int variable
18. Templates simulate which of the following feature?
A. If you were cat, you would be 5
B. If you were cat, you would be 2
C. If you were cat, you would be 7
D. None of the mentioned
Show Correct Answer
Correct Answer is :
If you were cat, you would be 2
19. Which keyword is used for the template?
A. 323334
B. 323232
C. 323130
D. none of the mentioned
Show Correct Answer
Correct Answer is :
323334
20. What is the correct syntax of defining function template/template functions?
A. 12345
B. 123456
C. compile time error
D. runtime error
Show Correct Answer
Correct Answer is :
12345
Similar Interview Questions
Search for latest jobs
Find Jobs