+ 1
What it means 👇👇
int x; string str[]="abcde"; printf("%-5.*s\n",x, string)
1 Odpowiedź
+ 5
First, your code has bugs. x must have a value and your abcde must be a quoted string.
%s states a string argument is to be printed.
- requests a left justified printing within the reserved area.
5 requests 5 spots to be reserved for the string.
.* an integer will be before the string to state the maximum characters to display.
x of 3 will print "abc \n", with 2 spaces.