Quote Originally Posted by MonkeyTennis View Post
Yes we have been fought pointers, however I understand how they work but not how to use them properly, that's the problem with cs50 through edx, its very disjointed. Should I be allocating s with a pointer and malloc before setting input to s?
What do you think that would gain for you?

There are a couple of good reasons to dynamically allocate data:
1. Large data structures, because generally in practice you can allocate more space with malloc() than would be permitted in a local array.
2. Data that needs to persist outside of the scope in which it was originally allocated.
3. Data whose size isn't known until runtime (with C99 this isn't absolutely necessary anymore).

If there's no good reason to make a pointer and allocate memory yourself, don't do it. It adds complexity in that you need to guarantee that the memory is deallocated when no longer needed.