-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathman_printf
More file actions
72 lines (57 loc) · 1.36 KB
/
man_printf
File metadata and controls
72 lines (57 loc) · 1.36 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
.TH MY_PRINTF 3 "June 2023" "Version 1.0" "User Commands"
.SH NAME
my_printf \- formatted output function
.SH SYNOPSIS
.B #include <main.h>
.sp
.B void my_printf(const char* format, ...);
.SH DESCRIPTION
The
.B my_printf
function is a custom implementation of the standard printf function in the C programming language. It provides formatted output capabilities, allowing users to print data with various formatting options.
.SH FORMAT SPECIFIERS
The following format specifiers are supported by
.B my_printf
function:
.TP
.B %c
Prints a single character.
.TP
.B %s
Prints a null-terminated string.
.TP
.B %d
Prints a decimal integer.
.TP
.B %x
Prints an integer in hexadecimal format.
.SH RETURN VALUE
The
.B my_printf
function does not return any value.
.SH EXAMPLES
The following examples demonstrate the usage of
.B my_printf
function:
.sp
Print a string and an integer:
.nf
.B #include <main.h>
.sp
.B int main(void) {
.B my_printf("Hello, %s! Today is the %dth of %s.\n", "ALX", 23, "June");
.B
.B return 0;
.B }
.fi
.SH SEE ALSO
printf(3)
.SH AUTHORS
Justine Ugwu <ugwujustineobinna@gmail.com>
.sp
Tiny Bila <bilatinym@gmail.com>
.SH BUGS
No known bugs.
.SH COPYRIGHT
Copyright (C) 2023 Jutine <===> Tiny.
This is free software; see the source code for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.