GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lachlanstephen/ft_printf_42: My ft_printf project for the 42 Cursus. A recreation of the printf function found in the <stdio.h> C Library. Bonuses in progress. 100/100

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
ft_printf
ft_printf
 
 
README.md
README.md
 
 

Repository files navigation

ft_printf

Mark: 100/100

Note: I'm currently working on the bonuses, so this repo wouldn't be able to be submitted as is.

ft_printf, one of three projects in Ring 1 of the 42 Cursus, introduced us to the idea of variadic functions: functions that take in a variable amount of arguments. Our task was to write a library that contains a recreation of printf from <stdio.h> in the Standard C Library.

Mandatory requirements:

  • Don't implement original printf buffer management
  • Handle the conversions cspdiuxX%
  • Output will be compared to original printf()

Bonus requirements:

  • Manage a combination of the flags -0. and field minimum width
  • Manage flags # + (one is a space)

Testing ft_printf functions

To test your own ft_printf, download main.c and testing_Makefile files from my repo, and move into your ft_printf project folder.

Run these commands to test your ft_printf functionality:

# Make using the specific Makefile with the -f flag

make re -f testing_Makefile

# Run compiled program

./test_printf

Compare the user output with the expected output.

Important: Make sure to run make fclean -f testing_Makefile to clean up files before submitting for evaluation.

To change the specifier my program tests:

  1. Edit the int main(void) function in main.c
  2. Comment out the currently active tests (with //)
  3. Uncomment desired test and recompile as above

Future Use of ft_printf

ft_printf can be added to your libft project folder to be used in future projects

Plan for repository

  • Complete bonus flag functionality
  • Create test function for bonus flags
  • Re-evaluate project with bonuses
  • Return whether diff of output is same or different from expected

About

My ft_printf project for the 42 Cursus. A recreation of the printf function found in the <stdio.h> C Library. Bonuses in progress. 100/100

Topics

4242adelaide42born2code42cursus42projects42schoolcc-functionsc-libraryft-printfft-printf-42ft-printf42function-librarymakefilenorminetteprintf-42printf42variadicvariadic-argumentsvariadic-function

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.