← Back to Question List
C++ Quiz #22
Delete on Stack Variable
This code has a bug that causes undefined behavior. What is the issue?
📄 Code
1#include <iostream>2using namespace std;34int main() {5 int x = 10;6 int* p = &x;7 cout << *p << endl;8 delete p;9 return 0;10}