Skip to content

Commit

Permalink
putchar
Browse files Browse the repository at this point in the history
  • Loading branch information
JayMburu committed Apr 14, 2022
1 parent 2aa0c0c commit f6f37b2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 0x0F-function_pointers/_putchar.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <unistd.h>

/**
* _putchar - writes the character c to stdout
* @c: The character to print
*
* Return: On success 1.
* On error, -1 is returned, and errno is set appropriately.
*/
int _putchar(char c)
{
return (write(1, &c, 1));
}

0 comments on commit f6f37b2

Please sign in to comment.