Comment by chongli
6 hours ago
K&R actually teaches this as a desirable idiom? People should not be recommending K&R to beginners today!
6 hours ago
K&R actually teaches this as a desirable idiom? People should not be recommending K&R to beginners today!
Kernighan spends a page whittling strcpy down to just that, with various intermediate versions. After showing you that version, he describes it like this:
Although this may seem cryptic at first sight, the notational convenience is considerable, and the idiom should be mastered, because you will see it frequently in C programs.