#include <stdio.h>
int main()
{
printf("%c
", 'abcd');
printf("%p
", 'abcd');
printf("%c
", 0x61626364);
printf("%c
", 0x61626363);
printf("%c
", 0x61626365);
return 0;
}
I want to ask this line : printf("%c
", 'abcd');
In this line, the result is 'd' but, I can't understand why 'd' is come out.
I tried to look other memories. In this situation, I found other memories have all alphabets.
Please explain me why result is 'd' and why other memories have all alphabets.
Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…