OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 59
Which of the following is incorrect in C++ ?
A
When we write overloaded function we must code the function for each usage.
B
When we write function template we code the function only once.
C
It is difficult to debug macros
D
Templates are more efficient than macros
E
None of These
Question 59 Explanation: 
TRUE: When we write overloaded function we must code thevfunction for each usage.
TRUE: When we write function template we code the function only once.
TRUE: It is difficult to debug macros
TRUE: Templates are more efficient than macros
1. Macros are a primitive form, without much compiler enforcement
2. Templates are more advanced, and have a lot better compiler type-checking, error messages, etc.
3. Templates can only generate dynamic class types
4. Macros can generate almost any code you want (other than another macro definition).
5. Macros can be very useful to embed static tables of structured data into your code.
Note: Excluded for evaluation. Given all options are correct.
Correct Answer: E
Question 59 Explanation: 
TRUE: When we write overloaded function we must code thevfunction for each usage.
TRUE: When we write function template we code the function only once.
TRUE: It is difficult to debug macros
TRUE: Templates are more efficient than macros
1. Macros are a primitive form, without much compiler enforcement
2. Templates are more advanced, and have a lot better compiler type-checking, error messages, etc.
3. Templates can only generate dynamic class types
4. Macros can generate almost any code you want (other than another macro definition).
5. Macros can be very useful to embed static tables of structured data into your code.
Note: Excluded for evaluation. Given all options are correct.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!