#include <iostream>
using namespace std;
int main(int argc, char **argv) {
int a=5;
int *p,*q;
*p = a;
*q = *p; //line 6
cout<<*p<<p<<*q<<q;
return 0;
}
This program hangs. It seems the problem is on line 6. Why is that?