Skip to content

n-andr/printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Printf

Printf is a project assigned as part of the curriculum at 42 school. The goal of this project is to implement a simplified version of the standard C library function printf.

Overview

The printf function in C is used to print formatted output. It allows you to specify the format of the output using format specifiers such as %d, %s, %c, etc., and then replace those specifiers with the corresponding values.

In the Print_f project, you will implement a basic version of the printf function that supports a subset of format specifiers and flags.

Getting Started

To get started with the Printf project, follow these steps:

  1. Clone the repository:
git clone https://github.com/yourusername/Printf.git

Supported Format Specifiers

The Print_f project supports the following format specifiers:

  • %c: Character
  • %s: String
  • %d: Integer (decimal)
  • %i: Integer (signed)
  • %u: Unsigned integer
  • %x: Hexadecimal (lowercase)
  • %X: Hexadecimal (uppercase)

Usage

To use the Print_f function in your C program, include the Print_f.h header file and call the Print_f function with the desired format string and arguments.

#include "ft_printf.h"

int main() {
    ft_printf("Hello, %s!\n", "world");
    ft_printf("The value of x is %d\n", x);
    return 0;
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published