Memory in modern operating systems are not directly mapped with the physical memory ( .i.e. the RAM). Instead, virtual memory addresses are used by the processes that are mapped to physical memory addresses. Goal is to save as much as physical memory as possible.
Virtual memory relies on the concept of Memory Paging which divides memory into chunks of 4kb called pages.

Pages within a process’s virtual address space can be in one of the 3 states -
// Allocating memory buffer of 100 bytes
// Method - 1 : Using malloc()
PVOID pAddress = malloc(100);
// Method - 2 : Using HeapAlloc()
PVOID pAddress = HeapAlloc(GetProcessHeap(),0,100);
// Method - 3 : Using LocalAlloc()
PVOID pAddress = LocalAlloc(LPTR,100);
Memory allocation functions return the base address which is simply a pointer to the beginning of the memory block that was allocated.

#include <Windows.h>
#include <stdio.h>
int main() {
PVOID pAddress = HeapAlloc(GetProcessHeap(), 0, 100);
printf("Base Address of Allocated Memory: 0x%p\\n", pAddress);
printf("Enter to quit...\\n");
getchar();
return 0;
}
PVOID pAddress = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,100);
const CHAR* cString = "Sushant is the best";
memcpy(pAddress,cString,strlen(cString));