Niche model in c