Vidyalelo
C Programming · Q53

C Fundamentals

Programming · C Programming · question 53

Q53

What will be the output of the following C code? #include void main() int x = 97; char y = x; printf("%c ", y);

A.
a
Answer
B.
b
C.
97
D.
Run time error

Answer: Option A

Solution

Answer: Option A
Solution:
1. Declaration: int x = 97;

2. Conversion: char y = x;

3. ASCII Value: The ASCII value of 97 corresponds to the character 'a'.

4. Print: printf("%c\n", y); prints the character 'a'.