-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
45 lines (41 loc) · 2.37 KB
/
main.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fsalem <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/26 14:11:53 by fsalem #+# #+# */
/* Updated: 2023/02/05 14:30:27 by fsalem ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int main(void)
{
char *p;
int f = 45;
/*------------This is the built int printf------------*/
ft_printf("\n\033[0;33m------------My ft_printf------------\033[0m\n\n");
ft_printf("This is the string output: %s\n", "Hello my name is Fatima Salem");
ft_printf("This is the decimal output: %d\n", '2');
ft_printf("This is the integer output: %i\n", '2');
ft_printf("This is the unsigned decimal output: %u\n", '2');
ft_printf("This is the lower case hexa output: %x\n", f);
ft_printf("This is the upper case hexa output: %X\n", f);
ft_printf("This is the pointer output: %p\n", &p);
ft_printf("This is the character output: %c\n", 'f');
ft_printf("This is the percentage output: %%\n");
ft_printf("\033[0;31mDon't hesitate to contact me for any software information\033[0m\n\n");
/*------------This is my ft_printf------------*/
printf("\n\033[0;36m------------Built in printf------------\033[0m\n\n");
printf("This is the string output: %s\n", "Hello my name is Fatima Salem");
printf("This is the decimal output: %d\n", '2');
printf("This is the integer output: %i\n", '2');
printf("This is the unsigned decimal output: %u\n", '2');
printf("This is the lower case hexa output: %x\n", f);
printf("This is the upper case hexa output: %X\n", f);
printf("This is the pointer output: %p\n", &p);
printf("This is the character output: %c\n", 'f');
printf("This is the percentage output: %%\n");
printf("\033[0;31mDon't hesitate to contact me for any software information\033[0m\n\n");
}