The code segment, data segment, stack segment, and extra segment are registers of the Intel 8086/8088 microprocessor in the original IBM PC (about 1983).
Each of these registers was 16-bits, and combined with another register to give 20-bit address space.
These are often referred to as CS, DS, SS, ES.
The CS register would point to the beginning of the code to execute, and when combined with the Instruction Pointer to the exact instruction executing. So CS:IP is what is executing. Likewise the stack would be at SS:SP.
DS and ES would point at data and be used in a similar manner.
The Intel 8086 gave rise to the Intel 80286, Intel 80386, Intel 80486, Pentium etc. So they are still with us today (I think).
So the code for printf and all other code will be in the code segment (CS) of the executable file. The formatting string for printf will be in the data segment (DS) of the executable file.