Skip to content
/ printf Public template

This project involves creating a custom printf function in C. It includes tasks that involve implementing various features and conversion specifiers of the printf function.

Notifications You must be signed in to change notification settings

Achrafsadeq/printf

Repository files navigation

0x11. C - printf

Description

This project involves creating a custom printf function in C. It includes tasks that involve implementing various features and conversion specifiers of the printf function.

Requirements

Category Details
Editors vi, vim, emacs
Compilation Ubuntu 20.04 LTS using gcc, with options -Wall -Werror -Wextra -pedantic -std=gnu89
File Endings All files should end with a new line
README A README.md file at the root of the project folder is mandatory
Coding Style Betty style, checked using betty-style.pl and betty-doc.pl
Global Variables Not allowed
Functions per File No more than 5
Allowed C Standard Library Functions write, malloc, free, va_start, va_end, va_copy, va_arg
Header File main.h (include guarded)

Tasks

Task Description
0 Write a function that produces output according to a format. Handle conversion specifiers c and s and %.
1 Handle conversion specifiers d and i.
2 Handle custom conversion specifier b.
3 Handle conversion specifiers u, o, x, X.
4 Use a local buffer of 1024 chars to call write as little as possible.
5 Handle custom conversion specifier S.
6 Handle conversion specifier p.
7 Handle flag characters +, space, and #.
8 Handle length modifiers l and h.
9 Handle field width for non-custom conversion specifiers.
10 Handle precision for non-custom conversion specifiers.
11 Handle 0 flag character for non-custom conversion specifiers.
12 Handle - flag character for non-custom conversion specifiers.
13 Handle custom conversion specifier r.
14 Handle custom conversion specifier R.
15 All options working together.

How to Use

Step Action
1 Clone the repository
2 Navigate to the project directory
3 Compile your code: gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o printf
4 Use the custom _printf function in your C programs

Mission Director

This operation is sanctioned by the ALX Software Engineering Program, under the command of Julien Barbier.

Developers

Codenames: Achraf Sadeq & Elhoucine Smaili


Acknowledgments

This project is part of the ALX Software Engineering Program curriculum.


About

This project involves creating a custom printf function in C. It includes tasks that involve implementing various features and conversion specifiers of the printf function.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages