After doing lot of research in Google, I found below program
Google
#include int main() { int val; char *a = (char*) 0x1000;
You can write to a specific memory location.
But only when you have the rights to write to that location.
What you are getting, is the operating system forbidding you to write to 0x1000.
0x1000