Following is a list of the conversion characters and theway they are used in the "printf" statement.
- left justification in its field (n) a number specifying minimum field width. to separate n from m (m) significant fractional digits for a float l to indicate a "long" These are all used in the examples which are included in the program presently displayed on your monitor, with the exception of the string notation which will be covered later in this tutorial.Compile and run this program to see what effect the various fields have on the output.
You now have the ability to display any of the data fields in the previous programs and it would
be to your advantage to go back and see if you can display any of the fields anyway you desire.
d decimal notation
o octal notation
x hexadecimal notation
u unsigned notation
c character notation
s string notation
f floating point notation
(the inbuilt Applix printf function has a %e conversion character, that prints the internal error message corresponding to an error number - this is not standard in C.) Each of these is used following a percent sign to indicate the type of output conversion, and between those two characters, the following fields may be added.- left justification in its field (n) a number specifying minimum field width. to separate n from m (m) significant fractional digits for a float l to indicate a "long" These are all used in the examples which are included in the program presently displayed on your monitor, with the exception of the string notation which will be covered later in this tutorial.Compile and run this program to see what effect the various fields have on the output.
You now have the ability to display any of the data fields in the previous programs and it would
be to your advantage to go back and see if you can display any of the fields anyway you desire.