C++ code to reverse a string and C code to print two threads.