-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathman_3_printf
More file actions
89 lines (78 loc) · 2.18 KB
/
man_3_printf
File metadata and controls
89 lines (78 loc) · 2.18 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
File Edit Options Buffers Tools Nroff Text Help
.\" DO NOT MODIFY THIS FILE!
.TH _PRINTF "1" "26 oct 2020" "GNU" "_printf man page"
.SH NAME
_printf \- format and print data
.SH SYNOPSIS
.B _printf
#include "holberton.h"
\fIFORMAT \fR[\fIARGUMENT\fR]...
.br
.B _printf
\fIOPTION\fR
.SH DESCRIPTION
_printf is an emulation of printf.
.PP
Produces output according to a format, such as the original
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
output version information and exit
.PP
FORMAT controls the output as in C printf. Interpreted sequences are:
.sp
As an emulation of the printf function it produce an output according to a format
.sp
.sp
Return:
.sp
The number of characters printed (excluding the null byte used to end output to strings)
.sp
If unable to print, returns -1 as error.
.sp
Output:
.sp
The _printf write output to stdout, the standard output stream.
.sp
Format:
.SH
.sp
This function receives as arguments a string, which goes between quotes "" For example it is used in this way:
_printf("We are in the best programming school"); and its screen impression would be : We are in the best programming school.
.SH OPTIONS
.sp
This _printf function apart from receiving string we can also use it to receive what we invoke.
.I conversion specifiers.
When it receives a string the argument will be given the % followed by a conversion format which will be between double quotes, according to the type,
it will print on screen the corresponding.
.sp
.sp
.PP
After % it will follow the formatting and a comma (,) which is separated from the argument and is a variable that has to be of the same type as the formatting
in the argument.
.sp
Invoking and its specifiers:
.sp
_printf("%formart", type of variable);
.sp
Types of Conversion Specifiers
.sp
%c Prints a single character.
.sp
%s Prints an entire string
.sp
%d, %i Prints an integer.
.sp
%b Prints an integer in binary format.
.sp
%u Prints an unsigned integer.
.sp
%o Prints an octal integer.
.sp
%x, %X Prints an hexadecimal integer.
.SH SEE ALSO
.sp
.SH AUTHOR
Juan Carlos Hernandez, Diego Lopez and Julio Cesar Arenas Cohort 13, Holberton school.