-
Notifications
You must be signed in to change notification settings - Fork 0
/
man_3_printf
111 lines (111 loc) · 2.05 KB
/
man_3_printf
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.\" Automatically generated by Pandoc 2.5
.\"
.TH "_PRINTF" "1" "The 11th of March, 2022" "printf 1.0.0" "User Manual"
.hy
.SH NAME
.PP
_printf \- this function is used for printing data input.
.SH SYNOPSIS
.PP
\f[B]man printf\f[R] [\f[I]OPTION\f[R]]\&...
.SH DESCRIPTION
.PP
**_printf** produces output according to a format
.SH EXAMPLES
.PP
** To print \[lq]Hello doc !\[rq] use:
.PP
#include \[lq]main.h\[rq]
.TP
.B _printf(\[lq]%s\[rq], \[lq]Hello doc !\[rq]);
To print \[lq]My favorite number is, 42\[rq] use:
.PP
#include \[lq]main.h\[rq]
.PP
_printf(\[lq]%s, %d\[rq], \[lq]My favorite number is\[rq], 42);**
.SH BUGS
.PP
Submit bug reports online at: <4249@holbertonschool.com>
.SH SEE ALSO
.PP
\&.
Full documentation and sources at: <>
.SH PROTOTYPE H.FILE
.PP
** int _printf(const char *format, \&...);**
.PP
** Print ARGUMENT(s) according to FORMAT as a string before the
\[lq]%\[rq]
.PP
\&.
Return the number of characters printed (excluded the null byte)
.SH FORMAT: string of characters.
.PP
\&.
The format string is composed of zero or more directives.
See man 3 printf.
.PP
\&.
Converter
.PP
\&.
[c] Character.
.PP
\&.
[d] or [i]: Decimal integer.
.PP
\&.
[u]: Unsigned integer.
.PP
\&.
[o] Octal.
.PP
\&.
[s] String of character.
.PP
\&.
[u] Unsigned decimal integer.
.PP
\&.
[x] Unsigned hexadecimal integer.
.PP
\&.
[X] Unsigned hexadecimal integer (capital letters).
.PP
\&.
[r] Reversed string of characters.
.PP
\&.
[R] Rot13'd string of characters.
.PP
\&.
[S] String with non-printable shown in hexa
.PP
\&.
[%] Character '%'.
.PP
\&.
[none] print normally (right justify, space fill)
.PP
.SH FLAGS: Format "%[SPECIFIERS][FORMAT SPECIFIERS].
\&.
[\-] Left justify.
.PP
\&.
[0] Leading zero fill.
.PP
\&.
[+] Print space in front of signed number.
.PP
\&.
[ ] Print plus in front of signed number if positive.
.PP
\&.
[#] Add prefix to certain numbers format (such as 0x for hexadecimal integers).
.PP
\&.
[NUMBER] Width flag - Sets output to have a minimum size
.PP
\&.
[+] print plus on numbers.
.SH AUTHORS: Written by Nicolas Boute and Siham Badyine for Holberton School