On code blocks(C++)
#include using namespace std; int main(){ int *p; cout<<*p; }
produces garbage value
In the first code as we are not setting the pointer it is taking random value address... Which may have some garbage value. But in second case pointer is not pointing to any address so obviously it will fail