Skip to content

yannallo/ft_printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ft_printf

Status Language Norminette

My own printf function

This is a reimplementation of the printf function from the C standard library. It introduces to structured programming, variadic programming and number base conversions.

Supported format specifier

Specifier Description
%c Single character
%s String
%p Pointer address
%d, %i Integer
%u Unsigned integer
%x, %X Hexadecimal (lower/uppercase)
%% Percent sign

Installation

# Clone repository
git clone https://github.com/yannallo/ft_printf.git

# Build
make -C ft_printf

Usage

Include the header in your file and link during compilation.

gcc -Ift_printf main.c -Lft_printf -lftprintf -o test

Example main.c

#include "ft_printf.h"

int main(void)
{
  char s[15] = "Hello world !!";

  ft_printf("Message:\n%s\n", s);
  return 0;
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published