There's no telling which of the child/parent that gets run first. Or they may run in parallel if you have multiple cores , or the OS might interrupt them at any point of execution and run the other child or parent process (or some entierly other process). kill() is also asynchronous, it sends the signal, and it might be handled by the receiver later, after kill() returns.
Nothing: Parent gets killed right after it does kill(pid, SIGKILL);
. Child gets killed right after it does kill(getppid(), SIGKILL);
"a": Child gets killed before or after it does kill(getppid(), SIGKILL);
. Parent gets to run to completion.
"b": Parent gets killed before or after it does kill(pid, SIGKILL);
. Child gets to run to completion.
"ab" Parent gets killed right after it prints "a" (or perhaps it manages to run to completion before the child signal arrives), child gets killed after it prints "b" (or perhaps it manages to run to completion before the parent signal arrives)
"ba" Same case as "ab", just that the child got scheduled to print "b" first.