What happens when you attempt to compile and run the following code?
#include
int main()
{
const int x=20; const int *ptr; ptr = &x; *ptr = 10; cout<<*ptr; return 0; }
A. It prints: 20
B. It prints: 10
C. Compilation error at line 8
D. It prints address of ptr