I am not able to understand the behavior of multi-character literal assignments. For instance take below program:
#include <stdio.h>
int main(void) {
// your code goes here
char a = '\010';
int b = 010;
char c = '310';
char d = '\310';
int e = 0310;
int f = 0x10;
char g = '\0x10';
char h = 'A';
char i = 'hello';
char j = '\hello';
char k = '\0hello';
printf("a=%d b=%d c=%d d=%d e=%d f=%d g=%d h=%d i=%d j=%d k=%d", a, b,c, d, e, f, g, h, i, j, k);
return 0;
}
This outputs:
a=8 b=8 c=48 d=-56 e=200 f=16 g=48 h=65 i=111 j=111 k=111
How are we getting these values? They do not look like ASCII values.
How does multi-character literal work in C?
What is the significance of \
if any?