Comment

Comment by anon946

Only if you let the mistake go unmentioned. I do a version of this where I glibly include a mistake, like:

    // Examples of dereference operator.
    int i, *ip = ..., **ipp = ...;
    i = *ip; // Assuming ip has been correctly initialized.
    i = **ipp; // Likewise.
    // The address-of operator is the opposite.
    ip = &i;
    ipp = &&i;
I actually talk through the last line. Almost no one ever questions it. I then ask students to look at that last line again, and ask them if an address has an address, and if so, what does that mean, could it ever be useful?
parent anon946 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton