Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

printf n characters c

// Only 5 characters printed. When using %.*s, add a value before your string variable to specify the length.
printf("Here are the first 5 characters: %.*s
", 5, mystr); //5 here refers to # of characters
Source by embeddedartistry.com #
 
PREVIOUS NEXT
Tagged: #printf #characters
ADD COMMENT
Topic
Name
5+2 =