Which of the following is incorrect in C++ ?
(1)When we write overloaded function we must code the function for each usage.
(2)When we write function template we code the function only once.
(3)It is difficult to debug macros
(4)Templates are more efficient than macros
(A) (1) and (2)
(B) (1), (2) and (3)
(C) (3) and (4)
(D) All are correct.
Answer: (D)
Explanation:
- When we write overloaded function we must code the function for each usage. Correct
- When we write function template we code the function only once. Correct
- It is difficult to debug macros Correct
- Templates are more efficient than macros Correct
So, option (D) is correct.
Quiz of this Question