An implementation of printf created as part of Holberton School Curriculum.
- write
- malloc
- free
- va_start
- va_end
- va_copy
- va_arg
- [c] - Betty style formatting
- Osama Basheer
- Brett Davis
| File Name | Short Description |
|---|---|
| _calloc.c | Allocates memory for an array |
| _strlen | Gets the length of a string |
| convert_to_binary | Converts an int to binary |
| convert_to_hex | Convert number to hex |
| convert_to_hex_low | Convert number to hex in lowercase |
| convert_to_oct | Convert number to oct |
| get_format | Finds the format specifier and performs an action |
| print_number | Prints number to buffer |
| printf.c | Prints a formatted buffer of variable arguments and types |
| rev_string | Function that reverses a string |
| rot13 | Function that encodes a string using rot13 |
#include <stdio.h>
int main()
{
char ch = 'H';
char str[10] = "Holberton";
int n = 150;
printf("Character is %c \n", ch);
printf("String is %s \n" , str);
printf("Integer value is %d\n" , n);
printf("Octal value is %o \n", n);
printf("Hexadecimal value is %x \n", n);
return 0;
}
Character is H
String is Holberton
Integer value is 150
Octal value is 226
Hexadecimal value is 96