जॉइन Examsbook
1230 0

प्र: 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); }

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

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

क्या आपको यकीन है

  त्रुटि की रिपोर्ट करें

कृपया संदेश दर्ज करें
त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई