For example, when we write:
int a;
and doing &a
gives us some address in hex form 0x12345678
which we call as virtual address.
Now when we try to do
int *temp = 0xfe000000;
does this address acts like a virtual address or a physical address? As far as I know virtual addresses are given by OS which are further converted to physical addresses by MMU.
As far as I know paging mechanism takes place in between which maps the virtual address to available physical address. What happens when we give an address to a pointer? Does that address acts like virtual address which is then handled by MMU to point to a particular physical address or it acts like a physical address in itself?
int temp;
printf("%x \n", &temp);
int *temp2 = 0xfe000000; //This is just an example address. It could be any address
Does this address (0xfe000000) acts like a real physical address or a virtual address?