Skip to content

Arenc10/printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

_Printf

Usage

#include "main.h"

int main(void)
{
    char c = 'A';
    _printf("The %s is %d\n", "number", 1024);
    _printf("First letter of the alphabet is %c", c);
    
    return (0);
}

Output: The number is 1024
Output: First letter of the alphabet is A

Description

The function _printf() produces output according a format like %c, %s, %d or %i

Conversion specifier
%c

  • _printf("%c", 'C');
    prints a character

%s

  • _printf("Hello"); or _printf("%s", "hello");
    prints a pointer to an array of character type (a pointer to a string)

%d, %i

  • _printf("%d", 1024) or _printf("%i", 1024);
    prints a number

%%

  • _printf("%%");
    prints '%'

Author

Arenc Palluqi
Kristi Seraj

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages