Const (computer programming): Difference between revisions

Content deleted Content added
m strchr problem: wording part 2. Technically, an implementation could look exactly like this.
m strchr problem: Added missing code tags
Line 299:
</syntaxhighlight>
 
However, in C neither of these is possible{{efn|In C11 and later <code>_Generic</code> could have been used to implement a const-correct <code>strchr</code>.
<syntaxhighlight lang=c>char* strchr_m(char *s, int c);
char const* strchr_c(char const *s, int c);