-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathman_3_printf
25 lines (25 loc) · 1.21 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
.TH _printf
.SH NAME
_printf - formatted output conversion
.SH SYNOPSIS
int _printf(const char *format, ...);
.SH DESCRIPTION
The _printf() function formats and prints output to the standard output stream (stdout). It writes the output to the terminal or other standard output device.
The format string defines the output format. It can contain plain characters and conversion specifications. Each conversion specification starts with the character '%', followed by an optional flag, width, precision, and conversion specifier.
.SH RETURN VALUE
Upon successful completion, _printf() returns the total number of characters written to the standard output stream. If an error occurs, it returns a negative value.
.SH FORMAT SPECIFIERS
The following format specifiers are supported:
%c Character: Outputs a single character.
%s String: Outputs a null-terminated string.
%d, %i Integer: Outputs a signed decimal integer.
.SH EXAMPLES
The following examples demonstrate the usage of the printf() function:
printf("Hello, world!\n");
int num = 42;
printf("The answer is %d.\n", num);
2:06
.SH AUTHOR
This man page was written by Romeo & Donald.
.SH COPYRIGHT
Copyright ©️ 2023