07-24-2023, 03:44 AM
Is there a way to specify how many characters of a string to print out (similar to decimal places in `int`s)?
printf ("Here are the first 8 chars: %s\n", "A string that is more than 8 chars");
Would like it to print: `Here are the first 8 chars: A string`
printf ("Here are the first 8 chars: %s\n", "A string that is more than 8 chars");
Would like it to print: `Here are the first 8 chars: A string`