-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathman_3_printf
More file actions
58 lines (41 loc) · 994 Bytes
/
man_3_printf
File metadata and controls
58 lines (41 loc) · 994 Bytes
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
.TH man 3 "17 March 2020" "Holberton School" "_printf man page"
.SH NAME
_printf - format and print data
.SH SYNOPSIS
.B #include "holberton.h"
.B _printf
.I FORMAT [ARGUMENT]...
.SH DESCRIPTION
Print ARGUMENT(s) according to FORMAT and return the number of characters printed excluding the null byte used to end output
FORMAT controls the output
.SH USAGE
For use arguments type the character
.I %
following by the option
The options are the folling:
.I c
prints a character
.I i
or
.I d
prints integer numbers
.I s
prints a string
.I x
or
.I X
converts decimal to hexadecimal numbers and print it
.I o
converts decimal to octal numbers and print it
.I u
prints unsigned int numbers
.SH EXAMPLE
Here some examples of usage:
_printf("example... int:%i, char:%c, string:%s, hexa:%X", 1, 's', "hello", 15);
output: example... int:1, char:s, string:hello, hexa:F
.SH ERROR
In case of error -1 value is returned
.SH SEE ALSO
man printf
.SH AUTHOR
Daniel Perez, Juan David Olivares