Internet Media Types

http://www.codechef.com/viewsolution/4505154 getting SIGSEGV error and cant find out why is it occuring please help question http://www.codechef.com/problems/MIME2

//