OOPS
August 29, 2024OOPS
August 29, 2024OOPS
Question 59
|
Which of the following is incorrect in C++ ?
When we write overloaded function we must code the function for each usage.
|
|
When we write function template we code the function only once.
|
|
It is difficult to debug macros
|
|
Templates are more efficient than macros
|
|
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.
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.
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.
Subscribe
Login
0 Comments