Skip to content
iam-shihoPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has been created as part of the 42 curriculum by swaragay.

Description

This project is a custom implementation of the hidden yet versatile printf function from the standard C library (libft). The goal of ft_printf is to mimic the behavior of the original printf, handling various format specifiers and managing variable numbers of arguments (variadic functions) without using the standard library's buffer management.

Supported Conversions

  • %c: Prints a single character.
  • %s: Prints a string (handles NULL pointers by displaying (null)).
  • %p: Prints a void * pointer argument in hexadecimal format (prefixed with 0x, handles NULL pointers by displaying (nil)).
  • %d / %i: Prints a signed base 10 integer (fully supports INT_MIN).
  • %u: Prints an unsigned base 10 decimal number.
  • %x: Prints a number in hexadecimal base 16 lowercase format.
  • %X: Prints a number in hexadecimal base 16 uppercase format.
  • %%: Prints a percent sign.

Instructions

Compilation

The library is compiled using cc with -Wall -Wextra -Werror flags.

To compile the library and generate libftprintf.a:

  • make: Compiles the mandatory functions and creates the library.

Cleaning Up

  • make clean: Removes all generated object files (.o).
  • make fclean: Removes all object files and the compiled libftprintf.a library.
  • make re: Forces a complete recompilation from scratch (equivalent to make fclean && make).

Resources

AI Usage

AI (Gemini) was utilized in the following aspects of this project: Documentation: Assisted in structuring, formatting, and generating this README.md to perfectly align with the curriculum guidelines.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages