Thanks for all the reply.

Fine. My problem is i have two program which the first program compiled and run without error but the second program cause an run time error. The problem for the second program is when the allocate has successfully allocate the memory for rowptr and rowptr_1. When the allocate function finish, rowptr and rowptr_1 become NULL at main.

Thanks for your help.