[SOLVED]"Segmentation fault" error with "strncpy" function in

Hello, guys! I'm trying to get a substring of a string in C and i'm using strncpy function to do this. The compilation doesn't show any error message, but when i try to run the program, i have a "Segmentation fault" error message in terminal! I'm using Debian with Gcc-4.7.