How access a specific memory portion through printf() function????

Hi friends,
Hope everyone is doing well. Please have a look at this simple program, you will figure out what I want.

 
#include <stdio.h>
 
int main()
{
printf("Enter an integer!\n");
scanf( "%d", 134511890 ); // Valid address on my computer
 
printf( "%d\n", ???? );
return 0;
}

What should I write instead of ??? to access the data that I just stored in that particular memory location???
Here is another program which works, but not the way I would want.

 
#include <stdio.h>
 
int main()
{
printf("Enter an integer!\n");
scanf( "%d", 134511890 );
 
int *p;
 
p = (int *)134511890;
 
printf( "%d\n", *p );
return 0;
}

Is it possible to read data from a specific memory address directly, without creating any pointers???
Looking forward to your helpful replies!
Thanks in advance!

printf ("%d\n", (int *)134511890) might work.

Assigning a pointer variable to the address seems neater, though. Why do you need to access a specific address anyway?

Yes it is possible on a system that doesnt implement any kind of memory management...so that there is no translation from logical to physical memory..."what you want is what you get". It is highly unlikely to find a MPU that doesnt implement memory mgmt nowadays even in the world of embedded systems...so looks like "you cant always get what you want..." :stuck_out_tongue:

How do you know that 134511890 is a valid memory address? Unless you mapped it in yourself, it likely isn't.

Most modern architectures and operating systems use virtual memory. You don't get physical addresses inside a user-mode process anymore, you get virtual ones, which the kernel can assign to whatever physical address it pleases. Most or all of the processes you run probably have their stacks in the exact same virtual location and still don't overlap because the physical addresses assigned to these processes are different.

To make this scheme still work quickly, the processor translates virtual addresses into physical ones in hardware at runtime.