CJCoding With Joseph
15free / daySign inCreate account
Back to Multiple Choice Quiz

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics

Dangling Pointer Access

C++ quiz · Question 23
easyDynamic Memory

This code compiles but has a serious bug. What is the issue?

Code

1#include <iostream>
2using namespace std;
3 
4int main() {
5 int* p = new int(99);
6 delete p;
7 cout << *p << endl;
8 return 0;
9}