Q. What is the value of character constant 'A' of ASCII character set?

  • (A) 1
  • (B) 65
  • (C) 101
  • (D) 20
πŸ’¬ Discuss
βœ… Correct Answer: (B) 65
Explanation:

In the ASCII character set, each character is assigned a unique integer value.

  • The character 'A' has an ASCII value of 65.
  • Similarly:
    • 'B' = 66
    • 'C' = 67
    • 'a' (lowercase) = 97

Example in C:

#include <stdio.h>

int main() {
printf("ASCII value of 'A' is: %d\n", 'A'); // Output: 65
return 0;
}

Why Not the Other Options?

  • (A) 1 β†’ Incorrect, as 'A' corresponds to 65 in ASCII.
  • (C) 101 β†’ Incorrect, 101 is the ASCII value of 'e'.
  • (D) 20 β†’ Incorrect, 20 is not the ASCII value of 'A'.

Thus, the correct answer is (B) 65.

Explanation by: Mr. Dubey

In the ASCII character set, each character is assigned a unique integer value.

  • The character 'A' has an ASCII value of 65.
  • Similarly:
    • 'B' = 66
    • 'C' = 67
    • 'a' (lowercase) = 97

Example in C:

#include <stdio.h>

int main() {
printf("ASCII value of 'A' is: %d\n", 'A'); // Output: 65
return 0;
}

Why Not the Other Options?

  • (A) 1 β†’ Incorrect, as 'A' corresponds to 65 in ASCII.
  • (C) 101 β†’ Incorrect, 101 is the ASCII value of 'e'.
  • (D) 20 β†’ Incorrect, 20 is not the ASCII value of 'A'.

Thus, the correct answer is (B) 65.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
350
Total Visits
πŸ“½οΈ
5 y ago
Published
πŸŽ–οΈ
Akash Lawaniya
Publisher
πŸ“ˆ
98%
Success Rate