-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path_printf_str.c
More file actions
32 lines (28 loc) · 830 Bytes
/
_printf_str.c
File metadata and controls
32 lines (28 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "holberton.h"
/**
* ps - Print array of characters
* @arg: arguments
* Return: Number of the length of every element of the array
* -------------------------------------------------------------
* Source File: _printf_str.c - program to print string chars
* -------------------------------------------------------------
* This file contains the program to print string characters
* -------------------------------------------------------------
* Authors - Carlos Garcia - Orlando Gomez - Cohort 10 - Cali
* Project Date - 25/10/2019 - 29/10/2019
* -------------------------------------------------------------
**/
int ps(va_list arg)
{
int con = 0;
char *str;
str = va_arg(arg, char *);
if (str == NULL)
str = "(null)";
while (str[con] != '\0')
{
_putchar(str[con]);
con++;
}
return (con);
}