write a c programs to find the trace of a given matrix.