What happens when you attempt to compile and run the following code?
#include
using namespace std;
int main()
{
const int x=0;
const int *ptr;
ptr = &x;
cout<<*ptr;
return 0;
}
It prints: 0
It prints address of x
It prints: 1
Compilation error
Submit