I know there are two types of addresses. Virtual and Physical. Printing the address of an integer variable will print its virtual address. Is there a function that will facilitate to print the physical memory of that variable?
Does virtual memory mean a section on hard disk that is treated as RAM by the OS?
No, there is no such (portable) function. In modern operating systems implementing memory protection, user-space (as opposed to kernel-space, i.e. parts of the OS) cannot access physical addresses directly, that's simply not allowed. So there would be little point.
No, virtual memory does not need to involve hard disks, that's "swapping" or "paging". You can implement that once you have virtual memory, since it gives the OS a chance to intervene and manage which pages are kept in physical memory, thus making it possible to "page out" memory to other storage media.
For a very in-depth look at how the Linux kernel manages memory, this blog post is fantastic.