-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMan_printf
More file actions
33 lines (18 loc) · 1.4 KB
/
Copy pathMan_printf
File metadata and controls
33 lines (18 loc) · 1.4 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
##The MAIN Work
- we are asked to implement a _printf function that works the same as Printf() func
so we had to make sure that the specifiers do the same, and to generate some of our own specifiers
* %c -> would be the specifier to print a single character
* %s -> would be the specifier to print a string( array of characters)
* %d -> would be the specifier to print a decimil number
* %i -> would be the specifier to print an integer number (the same as %d mainly)
* %b -> would be the specifier to print an unsigned int converted to binary
* %u -> would be the specifier to print an unsigned int
* %o -> would be the specifier to print an integer converted to octal type
* %x -> would be the specifier to print an integer converted to hex type in lower cases
* %X -> would be the specifier to print an integer converted to hex type in capital cases
* %S "generated" -> would be the specifier to print Non printable characters this way: \x, followed by the ASCII code value in hexadecimal (upper case - always 2 characters)
* %p -> would be the specifier to print the pointer value (address) of the arguements
* %r "generated" -> would be the specifier to print the string reversed
* %R "generated" -> would be the specifier to print the string converted to rot'13 code
* The '-' Flag -> align all the outputs to left according to the given width
We couldn't get it all done but so far it's quiet good