What will be the output of the following C code? int main() { int x = 107; char y = 'Q'; printf("%c%d", x, y); return 0; }
- A.107, Q
- B.k, 81
- C.k, Q
- D.Q, K
Show answer
Answer: B. k, 81
Character for ASCII 107 is 'k', and integer value of 'Q' is 81.
Answer: B. k, 81
Character for ASCII 107 is 'k', and integer value of 'Q' is 81.