Skip to content
/ printf Public

The C library function int printf(const char *format, ...) sends formatted output to stdout. Declaration. Following is the declaration for printf() function.

Notifications You must be signed in to change notification settings

pextech/printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

_printf project

##Desciption The C library function int printf(const char *format, ...) sends formatted output to stdout. Declaration. Following is the declaration for printf() function.

#Requirements:

  • Create your own header file named holnerton.h.
  • Specific compilation flag: gcc -Wall -Werror -Wextra -pedantic *.c
  • Authorized functions and macros: { write, malloc, free, va_start, va_end, va_copy, va_arg }

##use

  • Compile all created source code .c along with holnerton.h using gcc -Wall -Werror -Wextra -pedantic *.c
  • call _printf function

##Available Format specifier

Format Specifiers Description
%c to print a single character
%s to print a string
%d to print a decimal number
%i to print an integer

##Examples %c:

int main (void)
{
        _printf("%c", 'A');
}

output

$A

%s:

int main (void)
{
        _printf("%s", "Hello World");
}

output :

$ Hello World

%d :

int main (void)
{
        _printf("%d", 23);
}

output :

$23

##Authors

  • Cedric Mupenzi
  • Beniyam Legesse

About

The C library function int printf(const char *format, ...) sends formatted output to stdout. Declaration. Following is the declaration for printf() function.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages