 <p>This code segment</p> <pre><code> int* ptr_int; *ptr_int = 10; </code></pre> <p>is already wrong. Pointer ptr_int was not initialized. So the program has undefined behaviour.</p> <p>To test your code you could write for example</p> <pre><code>int main() { int* ptr_int = new int( 10 ); test_session ( &amp;ptr_int ); std::cout &lt;&lt; "Hello, world!\n"; delete ptr_int; } </code></pre>