Medium 10 questionsAI-generated
★★★★★★★★★★Not rated yet

C and C++ Quiz: pointers, memory and classes

Pointers and addresses, references, stack and heap, malloc and free, new and delete, memory leaks, constructors, destructors, const and the null pointer: the key notions of C and C++.

Start the quiz Created by lecouze13

Question preview

  1. In the statement p = &x ; what does the & operator applied to the variable x produce?
  2. In C++, what does the declaration int &r = x ; do?
  3. In C and C++, where are the local variables of a function placed, apart from dynamic allocation?

… and 7 more questions to discover by playing.