Q:

How do I get an address in C?

There is probably a really simple answer to this but I just can't see it.
#include <stdio.h>

int main(void) {
int x = 0;
printf("\n%d\n%d\n",x,&x);
}

Okay, so the printf gives 0 (x) and 2293752 (&x). I am trying to figure out a way to look at any address (&) and see what is already stored there. This is just for experimentation. Any help?

A:

void* memAddr = (void*)0xAABBCCDD; //put your memory address here
printf("int value at memory address %p is %i", memAddr, *((int*)memAddr));

You'll probably find that examining arbitrary memory addresses will just cause a crash.

