On page 105, the authors provide the following example:
/* Strcpy: copy t to s */ void Strcpy(char *s, char *t){ while ((*s = *t) != '\0'){ s++; t++; } }The authors state:
Because arguments are passed by value, Strcpy can use the parameters s and t in any way it pleases.
Should there not be a caveat here that this freedom only applies to s and not t? For instance,
t[0] = '4'; //inside of Strcpywould be disastrous at the caller site.
That is, even though t within strcpy is a copy of whatever pointer is the actual argument (say T) at the calling site, i.e., aren't the following asserts valid
assert(&t != &T);//so, t is "different" from T assert(t == T);//yet they point to the same address in memoryGodbolt link of above : https://godbolt.org/z/Ycfxfess6
So, there extends to s some freedoms (for e.g., one can arbitrarily write into it garbage before doing the true copy) which t does not enjoy.
[link] [comments]


![The Gang Republic: Inside Haiti’s New Order (2026) - ~3 million people living in the grips of all-out gang war. France24 spent a fortnight filming in and around the Haitian capital, speaking to a population held hostage by this drawn-out crisis (CC) [00:52:38]](https://external-preview.redd.it/0j1B98qWy2MAsjLEwjT10EbknBToMVuWRJ-tUeZsTso.jpeg?width=320&crop=smart&auto=webp&s=041d55dee546ef807e7eda2e0d1d013111f02a25)


English (US) ·