Skip to content

Instantly share code, notes, and snippets.

@ffyu-lj
ffyu-lj / interview.md
Created February 27, 2025 23:21 — forked from doevelopper/interview.md
interview on C++ reddit/cpp

C++ basics:

  • Difference between references and pointers?
  • Difference btw memory allocation in stack and on heap?
  • What kinds of smart points do exist?
  • How unique_ptr is implemented? How do we force that only one owner of the object exist in - unique_ptr ?
  • How does shared_ptr work? How reference counter is synchronized between objects?
  • Can we copy unique_ptr or pass it from one object to another?
  • what are rvalue and lvalue?
  • What are std::move and std::forward()