Hiding In The Buffer

This program is compiled and run as ./p > out.txt, so standard output is a regular file.

#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>

int main(void) {
    printf("A");
    if (fork() == 0) {
        printf("B");
    } else {
        wait(NULL);
        printf("C");
    }
    printf("\n");
    return 0;
}

What are the exact contents of out.txt afterwards?

A
ABC
B
AB
AC
C
AC
AB
D

AB
c