From 15c65d4bc4295899a834fb0682fbfc4fe175be77 Mon Sep 17 00:00:00 2001 From: Fernando Gonzalez-Morales <542@holbertonschool.com> Date: Sun, 21 Oct 2018 00:46:32 +0000 Subject: [PATCH] Added _putchar.c --- _putchar.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 _putchar.c diff --git a/_putchar.c b/_putchar.c new file mode 100644 index 0000000..b859fa9 --- /dev/null +++ b/_putchar.c @@ -0,0 +1,12 @@ +#include + +/** + * _putchar - writes the character c to stdout + * @c: The character to print + * Return: 1 on SUCCESS, + * -1 on error and errno is set appropriately. + */ +int _putchar(char c) +{ + return (write(1, &c, 1)); +}