Basic string operations in C