#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>

// Bypass -Werror on ideone.
#pragma GCC diagnostic warning "-Wnonnull"
#pragma GCC diagnostic warning "-Wformat"

static void look_ma_i_have_page_zero(void)
{
    if (mmap(NULL, 4096, PROT_READ | PROT_WRITE,
            MAP_SHARED | MAP_ANONYMOUS | MAP_FIXED, -1, 0) == MAP_FAILED) {
        perror("mmap() failed");
        exit(1);
    }
}

int main(void)
{
    look_ma_i_have_page_zero();
    
    // Теперь можно так:
    strcpy(NULL, "sup /pr/");
    printf("%s\n", NULL);
    
    // Или так.
    int *ptr = NULL;
    printf("Reading at %p: %i\n", ptr, *ptr);
}
