As I was trying to understand more the behavior of some functions I took two examples :
char str[]="Hello\0World"
and
char str[100];
scanf("%s",str);// enter the same string "Hello\0world"
The problem here that in the first example I got Hello
and in the second I got Hello\0world
why are the two characters \
and 0
interepreted as an end character of string in the first and not in the second one ?