Get Started
992

Q: Indicate what would the SWAP macro be expanded to on preprocessing. Would the code compile? #define SWAP (a, b, c ) (c t; t = a, a = b, b = t; ) main() {     int x = 10, y = 20;     SWAP (x, y, int );     printf ( " %d%d ", x, y); }

  • Show Answer
  • Workspace

Answer :
Explanation :

( int t ; t = a, a = b, b = t ;); This code won't compile since declaration of t cannot occur within parentheses.

The Most Comprehensive Exam Preparation Platform

Get the Examsbook Prep App Today