As you can see the string.h functions strcpy(), strrev() and strcmp() are used. The strcpy() functions to copy the input string to a second string. The strrev() function is then used to reverse this second string. We then have two strings that we can compare with strcmp() to check if the input string is the same as the reversed string. In the case of dynamically allocating string array using the command "new", we need to deallocate the allocated memory manually. But in the case of vector, this is not necessary. Reallocation is possible in vector, whereas it is not possible in the dynamically allocated array. 4. Passing String Array in a function.