+ 1
(i) char str = "hello"; (ii) char *str = "hello"; Why (i) is illegal and (ii) is legal?
3 Antworten
0
"---" is string literal and its type is pointer to char.
So it's illegal.
0
which is legal and which is illegal?
- 3
first one's illegal cause it's char not chat