|
Answer» printf("%-20.20s", data[d]); The "%-20.20s" argument TELLS the printf() FUNCTION that you are printing a string and you want to force it to be 20 characters long. By default, the string is right justified, but by including the minus SIGN (-) before the first 20, you TELL the printf() function to left-justify your string. This action forces the printf() function to PAD the string with spaces to make it 20 characters long. printf("%-20.20s", data[d]); The "%-20.20s" argument tells the printf() function that you are printing a string and you want to force it to be 20 characters long. By default, the string is right justified, but by including the minus sign (-) before the first 20, you tell the printf() function to left-justify your string. This action forces the printf() function to pad the string with spaces to make it 20 characters long.
|