is it possible to make sprintf hold more than 1 string , like use it like an array.
or is there any other way to create an array which can hold both integers and chars and not change their values ??
is it possible to make sprintf hold more than 1 string , like use it like an array.
or is there any other way to create an array which can hold both integers and chars and not change their values ??
What does that even mean?
sprintf is a function that returns a string. What you do with that string is up to you.
Arrays by definition must have every element of the same type.
Potentially you could use an array of an union and then just put the potential types in the union definition.
Although it may not be exactly what you want.