-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathman_3_printf
More file actions
executable file
·38 lines (37 loc) · 1.31 KB
/
man_3_printf
File metadata and controls
executable file
·38 lines (37 loc) · 1.31 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
.TH man 3 "19 March 2019" "1.0" "_printf man page"
.SH NAME
.B _printf
- formatted output conversion
.SH SYNOPSIS
int printf(const char *format, ...);
.SH DESCRIPTION
The function produce output according to a format as described below, the output is written to stdout, the standard output stream.
.SH FORMAT
.TP
%i
integer number
.TP
%d
integer number, the same as %i
.TP
%c
character
.TP
%s
string - prints (null) on null string
.SH Return value
Returns the number of characters printed (excluding the null byte used to end output to strings)
.SH Example
int r;
r = _printf("%s%c%c%c%s%%%s%c", "Loading ", '.', '.', '.', " 99", " Please wait", '\n');
_printf("%i", r);
output= Loading ... 99% Please wait
28
.SH Format of the format string
The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier.
.SH SEE ALSO
.I printf(3), printf(1)
.SH BUGS
Return -1 at print(%) only and print(NULL)
.SH AUTHOR
Ferney Medina, Jaiber Ramirez