0

my code on ft_strupcase :

char    *ft_strupcase(char *str)
{
    int i;

    i = 0;
    while (str[i] != '\0')
    {
        if ((str[i] >= 97) && (str[i] <= 122))
        {
            str[i] = str[i] - 32;
        }
        i++;
    }
    return (str);
}

And my code on main:

#include <stdio.h>
#include <string.h>

#include "ft_strupcase.c"

int main(void)
{
    printf("abc...: %s\n", ft_strupcase("abcdefghijklmnopqrstuvwyxz"));
    printf("mixed: %s\n", ft_strupcase("aBcDeFgHiJkLmNoPqRsTuVwYxZ"));
    printf("random: %s\n", ft_strupcase("rijgr'{`@["));
    printf("empty: %s\n", ft_strupcase(""));
}

I'm sure it is something really stupid on main but I can't figure it out.

Miguel M
  • 182
  • 1
  • 11

0 Answers0