What will be the output of the following? main() { int a = 'A'; printf("%d",…

2018

What will be the output of the following? main() { int a = 'A'; printf("%d", a); }

  1. A.

    A

  2. B.

    a

  3. C.

    65

  4. D.

    Compilation error

Attempted by 1083 students.

Show answer & explanation

Correct answer: C

Answer: 65 'A' is a character constant whose ASCII value is 65.

Explore the full course: Up Lt Grade Assistant Teacher 2025