character to asic value in c/c++

main()
{
char z=’a’;
printf(“%d”,z);
}

Tutorial answer:
97
Debugging solution:
Variable z is assing in character but in the printf statement it will act as integer because printf it has %d so it will display a,(a asic value is 97)

Related post