Few things
system() not a printf style function. You will need to use sprintf() to create your argument earlier.system() return value is int, not char- As a rule, it is not recommended to rewrite function parameters.
What are you trying to do? It seems that all this function is performed by ping (which without the -c argument will never finish working with linux).
source share