Re:Tell HN: Unpaid home assignments are not ok
by koonsolo on Friday August 12, 2022 @11:08AM
(#32439748)
9 out of 10 for me means you know metaprogramming etc.
Any answer is basically fine, as long as it's clear you know what pointers are.
It's basically also a starter question to go further into memory allocation and freeing, smart pointers, etc.
The thing is, it's fine if you answer 3/10 "because it's been a while since I saw it". It's just to probe self knowledge.
Serious question, if the person actually had a 9 out of 10 knowledge of C++, how would he answer? Or is this just a teaser question?
I don't know C++ but I would answer pointers are addresses in physical (?) memory. They let you pass around variables by reference where the receiving function has full access and permission to edit its content. Pointers have to be dereferenced with the appropriate type before being able to read it