[ad_1]
%%.2f needs an extra % symbol to make the final .2f into a format rather than the string literal that’s being displayed.
Secondly realloc is intended to resize a previously calloc-ed array in memory.
[ad_2]
solved Source code using a structure pointer