`% a` in string reads as a point in memory [duplicate]

Solution 1:

To escape the symbol '%' in the format string you need to double it like

printf("\nc = a %% b\n"