-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathman_3_printf
More file actions
executable file
·69 lines (65 loc) · 1.68 KB
/
man_3_printf
File metadata and controls
executable file
·69 lines (65 loc) · 1.68 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
65
66
67
68
69
.TH man 3 "30 Jul 2019" "Holberton School" "Project 0x11"
.SH NAME
.B _printf
- converts formatted output.
.SH SYNOPSIS
.nf
.B "#include \(dqholberton.h\(dq"
.PP
.BI "int _printf(const char *" format ", ...);"
.fi
.PP
.SH DESCRIPTION
.BR _printf()
produces a formatted output similarly to the function
.BR printf()
from the C standard input/output library
.BR stdio "(3)"
The function will producte the output under the control of the
.I format
string that specifies how many arguments (provided via variable arguments
from
.BR stdarg "(3))"
will be converted to the
output and the type for each argument.
.SS
The format string
The format string consists in a character string and it can be composed
of zero or more directives: ordinary characters that will be printed without
any change to the standard output, and
.I conversion specifications
indicated with the
.BR %
character and ending with a
.IR "conversion specifier" .
The arguments and its types must correspond properly to the conversion
specifications provided in the
.I format
string.
.SS
Conversion specifiers
A conversion specifier can be applied to a provided argument, it should
correspond with the data type of the argument:
.TP
.BR d ", " i
Will convert and print an
.BR int
type with signed decimal notation.
.TP
.BR c
Converts and prints an
.BR int
type to its ASCII equivalent, using the
unsigned character notation.
.TP
.BR s
Takes a
.BR "const char *"
argument (an array of characters). Every character in the array will
be printed to the output from start to finish up to (but not including)
the null terminating byte (\(aq\e0\(aq).
.TP
.BR %
Prints a literal percentage ('%') character.
.SH AUTHORS
Javier Cortés and Sergio Zamudio