Y
Hacker News
new
|
ask
|
show
|
jobs
by
Skunkleton
2104 days ago
It certainly has string literals, which are a kind of type.
1 comments
mark-r
2104 days ago
That's the thing, they're not a type - they're just an array of char with an unspecified length, indistinguishable from any other array of char or pointer to char. Only the convention of ending them with a null character makes them usable at all.
link
Skunkleton
2104 days ago
printf("%lu\n", sizeof("Well, actshully")); -> 16
link
rightbyte
2104 days ago
One could say that C has a different type for each string size plus the joker pointer to char.
link