In the first snip, be wary of integer division! 1/2 = 0 when dealing with integers.
In the second snip... (for printf) "On success, the total number of characters written is returned." So you're printing the string "Good", then you're printing the return value of that printf which you stored in a.
The third fragment makes sense if the last printf's string starts with \r rather than just r
\b = backspace
\r = carriage return (move to the start of the line)
And \n is new line, of course.
1 2 3 4 5 6
main()
{
printf("\nab"); // print new line followed by ab
printf("\bsi"); // backspace 1 char and output si
printf("\rha"); // move to start of line and output ha
}