This expression consists of two parts:
c = *str- this is a simple assignment cfrom dereferencing a pointer,val != 0 is a comparison with zero.
, , . , char, . , , , , char c .
, != 0 C, while :
while ((c = *str)) {
...
}
, , , . , , c = *str, c == *str, . .