Q. Which of the following correctly defines a macro with parameters?

  • (A) #define SQUARE(x) x*x
  • (B) #define SQUARE x*x
  • (C) #define SQUARE(x) (x*x)
  • (D) #macro SQUARE(x) x*x
πŸ’¬ Discuss
βœ… Correct Answer: (C) #define SQUARE(x) (x*x)
Explanation: Use parentheses to avoid unexpected precedence issues.
Explanation by: Mr. Dubey
Use parentheses to avoid unexpected precedence issues.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
69
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate