Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

This project reimplements printf in C, handling formatted output with custom support for various specifiers.

Notifications You must be signed in to change notification settings

deryaxacar/42-Ft_printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42 - Ft_printf 🖨️

This project is a reimplementation of the standard C printf function. The printf function is used to produce formatted output and supports various data types and format specifiers. The ft_printf function replicates this behavior while operating independently of standard library functions, offering a fully customizable structure.

Project Purpose 🎯

This project was created to understand the core functionality of the printf function and to gain hands-on experience by writing a similar function ourselves. It also helps develop a deeper understanding of string manipulation, memory management, and formatting in the C programming language.

Use Cases 🛠️

The ft_printf function provides an interface similar to the standard printf. Possible use cases include:

  • Printing basic text and variables: ft_printf("Hello, %s!\n", "world");
  • Formatting numbers: ft_printf("Decimal: %d, Hexadecimal: %x\n", 42, 42);
  • Using special format specifiers: ft_printf("Float: %f, Char: %c\n", 3.14, 'A');

Project Structure 📂

The project includes the main ft_printf function along with helper functions and structures. It typically consists of the following:

  • Makefile: Build configuration file. 🛠️
  • ft_printf.h: Header file containing prototypes and structure definitions. 📜
  • ft_printf.c: Contains the main ft_printf function and its helper implementations. 🔧
  • ft_utils.c: Includes utility functions for character output and format specifier processing. 🧩

2025 This project was created by Derya ACAR.