Something went wrong. Try again.
42 project to recreate printf
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334/* ************************************************************************** *//* *//* ::: :::::::: *//* ft_sprintf.c :+: :+: :+: *//* +:+ +:+ +:+ *//* By: jkrishna <jkrishna@student.42.fr> +#+ +:+ +#+ *//* +#+#+#+#+#+ +#+ *//* Created: 2026/05/04 12:12:35 by jkrishna #+# #+# *//* Updated: 2026/06/05 10:55:22 by jkrishna ### ########.fr *//* *//* ************************************************************************** */
#include "ft_printf.h"
int ft_sprintf(char *str){ int j; int count;
j = 0; count = 0; if (!str) { count += write(1, "(null)", 6); return (count); } while (str[j]) { count += write (1, &str[j], 1); j++; } return (count);}