But if I catch and handle the exception in the main function (which invoked pthread_create on the function which throws the exception), the thread executing the invoked function would terminate am I correct?
so that means that the thread's call stack begins with the function which is passed to pthread_create?
and if I don't handle the exception in that function then the thread terminates? am I correct?
Correct. And it goes without freeing dynamically allocated resources aquired by the thread unless they're released thru the normal stack unwind mechanism.