ProgrammingModerateTCS NQT · Wipro

What is printed?

What is printed?
#include <stdio.h>
int main(void) {
    char c = 'A';
    c += 32;
    printf("%c %d", c, c);
}
  1. A. A 65
  2. B. a 96
  3. C. a 97
  4. D. { 123

Correct answer: C. a 97

Adding 32 to 'A' (65 in ASCII) gives 97, which is 'a'. Assume ASCII encoding for this conversion.

More C Programming questions

Exams that ask this topic