Python yield and C++ friend/static Keywords
This problem covers three keywords that come up constantly in systems and quant coding interviews.
**(a)** Explain the `yield` keyword in Python. What does it do, how does it differ from `return`, and why would you use it?
**(b)** Explain the `friend` keyword in C++. What does it grant, and what are the typical use cases?
**(c)** Explain the `static` keyword in C++. It has several distinct meanings depending on context -- cover at least three of them.
Open the full interactive solver, hints, and worked solution →