+ 1

What is this piece of code stand for??? And how this thing works?

printf("%s%13s\n","Element","Value");

16th Jun 2018, 10:19 AM
primex
primex - avatar
3 Antworten
+ 5
The percent in the first string to printf states you want argument replacement. The s states the argument will be a string. The optional number states you want a minimum of 13 characters. This reference gives the full syntax. http://www.cplusplus.com/reference/cstdio/printf/
16th Jun 2018, 10:56 AM
John Wells
John Wells - avatar
+ 2
%13s -> leave space for 13 characters
16th Jun 2018, 10:46 AM
‎ ‏‏‎Anonymous Guy
+ 2
thank u 😊
16th Jun 2018, 4:18 PM
primex
primex - avatar