#include #include #include #include #define NULL 0 int main() { int fd; char* s; fd = open ("teste.txt", O_RDWR); s = mmap (NULL, 100, PROT_WRITE, MAP_PRIVATE, fd, 0); s[2] = 'z'; munmap(s, 100); return 0; }