Is this a correct implementation of realloc()? : I want to be able to have a user enter what they wish to do. There will be other options but for now I am working on "insert". The other two options will be "search" and "delete". 

    int main() {
    
        char *input = malloc(sizeof(char) * 6);
        printf("%s", "WELCOME TO USER'S SKIP LIST!\n\nWhat do you wish to do? ");
        scanf("%6s", input);
        if (strcmp(input, "insert") == 0) {
            printf("%s", "What is the item? ");
            input = realloc(input, (size_t)scanf("%s", input));
        }
    }

I initially allocate enough memory for `input` to have 6 characters. This is because the other two options will also only have 6 characters. After they enter `insert` they will have to enter an item that will have any number of characters, so I want to reallocate memory for `input` based on what they enter for an item. So if they enter `Nintendo Switch` there will be a reallocation for 15 characters. Is my implementation of `realloc()` the correct way of doing this?

