Improved test_string.c to make it more detailed and easy to understand