Machine-translated by Google. Questions are authored in English.
Top

Discussion

Macros with arguments are allowed

  • A.True
  • B.False

Answer: A

Correct answer: True

Function-like macros with parameters are ordinary: #define MAX(a,b) ((a) > (b) ? (a) : (b)). The arguments are substituted as text, which is why the parameters and the whole body need parenthesising and why an argument with a side effect can be evaluated more than once.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.