Q. What is the value of character constant 'A' of ASCII character set?
β
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.