-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathman_3_printf
More file actions
64 lines (61 loc) · 2.14 KB
/
man_3_printf
File metadata and controls
64 lines (61 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.TH man 3 "17 March 2020" "0.1" "_printf man page"
.SH NAME
.B _printf
- Formatted output conversion.
.SH SYNOPSIS
.B int _printf(const char *
.I format
.B , ...)
.SH DESCRIPTION
.B _printf()
Prints to standard output under the control of a
.I format
string that specifies how subsequent arguments are converted for output.
.SH Return value
On successful return, these functions return the number of characters printed, excluding the null byte used to end output to strings.
If an output error is encountered, a negative value is returned.
.SH Format of the format string
The format string is composed of 0 or more directives (ordinary characters that are not %), which are copied to the output stream. The format string is also composed of conversion specifications, each of which result in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character % and ends with the conversion specifier.
The argument must correspond properly with the conversion specifier. By default, the arguments are used in the order given.
.SH The conversion specifier
The conversion specifiers and their meanings are:
.TP
.BR c
The int argument is converted to an unsigned char, then print a single char
.TP
.B s
The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to a terminating null byte, but don't include the terminating null byte.
.TP
.B i
This prints an integer in base 10.
.TP
.B d
This prints a decimal number in base 10
.TP
.B r
This prints a string in reverse
.TP
.B R
This prints a string in Rot13 mode
.TP
.B S
This prints a nonprintable character like \n or another like this form \x. The only printable characters in ascii are from 32 to 126.
.TP
.B b
This prints a integer number converted into a binary number
.TP
.B u
This prints a unsigned decimal (integer) number
.TP
.B o
This prints a decimal number converted into a octal number
.TP
.B X
This print decimal numbers in base 16 in uppercase
.TP
.B x
This print decimal numbers in base 16 in lowercase
.SH BUGS
No known bugs.
.SH AUTHORS
Miguel Angel Cipamocha Figueredo, Brian Steven Mosquera Gamboa