C++ basics
English
Mittelstufe
Test your knowledge in C++!
Beschreibung
Schlagwörter
30
Fragen
15 Sek
Pro Frage
3:42
Durchschnittliche Zeit
4,0
Ergebnis des Wettbewerbs
3,5
Community-Bewertung
53
Teilnehmer
Educational explanations. 👍 Explanations cover why the correct answers are correct and why the wrong answers are wrong (when appropriate). E.g.: #q1, #q2, #q3
You can use an int variable too.
Example: https://ideone.com/R8mreY
Can be deallocated only using delete operator. It is NOT deallocated at the end of the program, if not explicitly done before
Proof: https://ideone.com/lWKjfJ. In this code, destructor won't be called.
Every object allocated in the memory from the program, once it ends, is deallocated from the memory, since the stack is removed.
Operator & returns pointer, not reference. You don't need any operators at all to get reference to object.