C++ Programming Questions to Ask on Interview (2017)
OK I&#x27;ll bite.<p>1 - knowing this is 100% useless information, in reality I have a compiler to tell me that.<p>2 - Seriously? new&#x2F;delete in 2018? In very rare cases when I need a raw pointer I call unique_ptr::release().<p>5 The question is so-so but the answer&#x27;s wrong. Iterators don&#x27;t need to point anywhere. You can make an iterator generating values instead of referencing container. Not necessarily a good idea but still.<p>6 Same. Just because it&#x27;s not specified in C++ standard doesn&#x27;t mean it&#x27;s bad, or should be avoided. E.g.<p><pre><code>    const uint32_t n = 11;
    printf( &quot;Eleven: %d\n&quot;, n );
</code></pre>
is UB but the code is 100% fine to my standards. Stuff like OpenMP or intrinsics is not specified either, does it mean we should avoid them?<p>8-9 IMO template metaprogramming should be avoided. If you want your template data structure to behave differently for pointers and non-pointers, expose another template argument for that, there&#x27;s too many corner cases like handles (technically pointers, logically values) and smart pointers (the opposite).<p>10 I don&#x27;t think the sorted vector listed in &quot;possible answer&quot; is a max heap.<p>Conclusion: if the OP claims the questions are &quot;Proven&quot;, I&#x27;m curious about provement methodology.