ProgrammingModerateTCS NQT · Wipro

What is printed?

What is printed?
#include <stdio.h>
int main(void) {
    printf("%d", (int)'\x41' + '\101');
}
  1. A. 65
  2. B. 131
  3. C. 130
  4. D. 66

Correct answer: C. 130

'\x41' and the octal escape '\101' both denote the character 'A', whose value is 65, so the sum is 130.

More C Programming questions

Exams that ask this topic