ft_toupper
Subject
TOUPPER(3) (simplified)
NAME
toupper -- lower case to upper case letter conversion
SYNOPSIS
int toupper(int c);
DESCRIPTION
The toupper() function converts a lower-case letter to the corresponding upper-case letter. The argument must be representable as an unsigned char or the value of EOF.
RETURN VALUES
If the argument is a lower-case letter, the toupper() function returns the corresponding upper-casse letter if there is one; otherwise, the argument is returned unchanged.
Understandable explanation
I don't think I'll need to explain with more details what this function does, the man is pretty self-explanatory on this point.
Hints
int ft_toupper(int c)
{
if (/* c is lower-case letter */)
return (/* corresponding upper-case letter */);
return (c);
}
Commented solution
Last updated
Was this helpful?