Consider a C program:
#include <stdio.h>
int main (void)
{
int x = 'a';
printf("%d", x);
}
Here the output is 97
as per the ASCII value table.
But in the example below:
#include <stdio.h>
int main(void)
{
int x ='aa';
printf("%d", x);
}
The output is 24929
.
Can anyone please explain how the literal has been converted to this integer value?