Hi guys, just flagged in my head something like this, if I have started a pointer to string and write like this statement:
Code:
char *p1 = strstr(ac_auto, "Cboard ") + 5
assuming strstr is defined and all things are alright(ac_auto is a string), but lets assume that's strstr is returning pointer "NULL" so NULL+5 isn't defined because NULL is void and can't be manipulated of. so what's happen in that case? I tried that in my PC the compilation is typically work but on the screen doesn't appear anything however I write printf after this case, meaning
Code:
char *p1 = strstr(ac_auto, "Cboard ") + 5 ;
printf("Hi");
but it doesn't print Hi if strstr returns NULL.