Re:Go's Declaration Syntax (2010)
by Ded7xSEoPKYNsDd on Sunday November 23, 2014 @10:40AM
(#8649010)
Well, you can declare your variable as const char s[] = "...". And if strncmp were to be defined today, it really should have a prototype of int strncmp(size_t n, const char s1[static n], const char s2[static n]). This is valid C99, although it seems nobody writes code like this and prefers to degrade their arrays to pointers. (Today's C also has pointers to arrays, so the need for dynamic allocation is no valid excuse either.)
[ Parent
| on HN ]
There are no comments on this comment yet.