?
What will be the output of the following C code?
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 97;
char y = x;
printf("%c\n", y);
}
#include <stdio.h>
void main()
{
int x = 97;
char y = x;
printf("%c\n", y);
}
Answer & Solution
Correct Answer:
Option
A
1. Declaration:
2. Conversion:
3. ASCII Value: The ASCII value of
4. Print:
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'.
Join the Discussion
Login to post a comment or share your explanation.
Loginhere
x=97
y=x
97=a (ASCII table)