Hey,
Is there a way to know the contents at address 6295600(say) in C ?

I don't want to do using a pointer, that is, something like

printf("%d",*p);

int a = 5;
p = &a;
and address of a = 6295600.

I want to be able to do something like,

printf("\nContents = %IDon'tKnow",6295600);

Thanks.

printf("%d", *(int*)6295600)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.