MCQs
Total Questions : 43
| Page 5 of 5 pages
Answer: Option B. -> a = 12, b = 10
The macro SWAP(a, b) int t; t=a, a=b, b=t; swaps the value of the given two variable.
Step 1: int a=10, b=12; The variable a and b are declared as an integer type and initialized to 10, 12 respectively.
Step 2: SWAP(a, b);. Here the macro is substituted and it swaps the value to variable a and b.
Hence the output of the program is 12, 10.
Answer: Option A. -> True
Answer: Option B. -> False