I have a code with a character array as follows:
int main (int argc, char** argv)
{
char arr[] = "%55u%10$n";
return 0;
}
I wish to dynamically set 10 through a string input from the user, for example argv[1].
What would the correct syntax of the following be:
char arr[] = "%55u%" argv[2] "$n"; // which would basically be "%55u%10$n" if argv[1] == "10"
'1'and'0'.argv[1]is going to be. See Remy's answer or usestrcat