-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuoxX.c
More file actions
41 lines (37 loc) · 968 Bytes
/
uoxX.c
File metadata and controls
41 lines (37 loc) · 968 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
#include "main.h"
/**
* print_unsigned - print unsigned int
* @arg: va_list argument containing the unsigned int
* Return: number of printed characters
*/
int print_unsigned(va_list arg)
{
return (numprint(va_arg(arg, unsigned int)));
}
/**
* print_octal - print unsigned int in octal format
* @arg: va_list argument containing the unsigned int
* Return: number of printed characters
*/
int print_octal(va_list arg)
{
return (dectooct(va_arg(arg, unsigned int)));
}
/**
* print_hex - print unsigned int in hexadecimal format
* @arg: va_list argument containing the unsigned int
* Return: number of printed characters
*/
int print_hex(va_list arg)
{
return (dectohex(va_arg(arg, unsigned int), 0));
}
/**
* print_HEX - print unsigned int in uppercase hexadecimal format
* @arg: va_list argument containing the unsigned int
* Return: number of printed characters
*/
int print_HEX(va_list arg)
{
return (dectohex(va_arg(arg, unsigned int), 1));
}