Comment by layer8
20 hours ago
The idiomatic
void strcpy(char *s, char *t)
{
while (*s++ = *t++)
;
}
(straight from K&R) wouldn’t work without it.
20 hours ago
The idiomatic
void strcpy(char *s, char *t)
{
while (*s++ = *t++)
;
}
(straight from K&R) wouldn’t work without it.
K&R actually teaches this as a desirable idiom? People should not be recommending K&R to beginners today!
Which many people find unreadable compared to other versions.
And for several reasons.
And I have seen
in some places!
It is concise syntax but very confusing.