Skip to content

Latest commit

 

History

240 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

0020246962e845a9a6fd5a9618657d19 png~tplv-6bxrjdptv7-image

GROUP PROJECT !!!

Building this project recquires with teammates recquires to have primary workflows like:

Approaching a project, group projects, how to pair programming, flowcharts

CONTEXT

Build a printf function

Use man to have documentation

A readme file at the root folder of the project

Betty style code

Not allowed to use global variables

No more than 5 functions per file

No use of main.c

The prototypes of all the functions should be included in the header file called main.h

All the header files should be include guarded

Build a putchar function for the project

AUTHORIZED FUNCTIONS AND MACROS

write malloc free va_start va_end va_copy va_arg

TASKS

Write a function that produces output according to a format prototype: int _ printf(const char * format, ...) Returns the number of characters printed (excluding the null byte used to end output to strings) Write output to stdout, the standard output stream Format is a character string. The format string is composed of zero or more directives. You need to handle the following conversion specifiers: c, s, % You don't have to reproduce the buffer handling of the C library printf function You don't have to handle the flag characters You don't have to handle field width You don't have to handle precision You don't have to handle the length modifiers

- PRINTF GROUP PROJECT

image

Description

_printf is a simplified version of the standard library function printf in C. It's designed to be lightweight and easy to understand, making it ideal for educational purposes or for use in simple embedded systems.

Here are some of its key features:

Prints strings and characters to stdout: _printf allows you to print strings and characters to the standard output, which is usually the console or terminal.

Supports basic format specifiers: It supports the basic format specifiers that are commonly used in C programming. These include %c for characters, %s for strings, %d and %i for integers, and %% for printing the '%' character itself.

Easy integration: _printf can be easily integrated into any C project. You just need to include the header file and the source file in your project, and you're good to go.

Demonstrates the use of variadic functions and parsing format specifiers: One of the main educational benefits of _printf is that it demonstrates how to use variadic functions in C. These are functions that take a variable number of arguments. It also shows how to parse format specifiers, which are the placeholders in the format string that tell the function what type of data to expect

Installation

To run this project, you'll need a C compiler. Here's how to install the GCC compiler on Ubuntu :

sudo apt-get install gcc

To use this project in your own code, follow these steps:

Download _printf: You can download the _printf source code from the GitHub repository using one of the following methods:

Clone the repository: If you have Git installed on your computer, you can clone the repository using the following command:

git clone https://github.com/evrade10/holbertonschool-printf.git

Downloading the source code: If you don't want to clone the repository, you can download the source code as a ZIP file by clicking on the "Code" button on the repository page and selecting "Download ZIP".

include _printf in your project: Once you have downloaded the source code, you need to add the following files to your project:

_printf.c : The source file containing the implementation of the _printf function.

main.h: The header file containing the declaration of the _printf function.

_char.c, _int.c, _string.c, itoa.c : The source files containing the helper functions used by _printf.

Compile your project: Once you have added the necessary files to your project, you can use the _printf function in your code. To do this, you need to include the main.h header file in your source files where you want to use the _printf function.

#include "main.h"

You can then compile your project using your favourite C compiler. For example, if you use GCC, you can use the following command:

gcc myprogram.c _char.c _int.c _string.c itoa.c _printf.c -o myprogram

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages