42_C_PISCINE/Rush/Rush02/ex00/ft_ctoa.c

24 lines
1.0 KiB
C
Raw Normal View History

2023-05-17 12:45:25 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ctoa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/31 18:41:31 by cchauvet #+# #+# */
/* Updated: 2022/07/31 22:42:20 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "rush02.h"
char *ctoa(char c, unsigned int size)
{
char *str;
str = malloc(sizeof(char) * size);
str[0] = c;
str[1] = '\0';
return (str);
}