codeguru_2009 36 Light Poster

pls reconsider your while loop. its a infinite loop. 'n' never changes so 'count' gets continuous increment. hence 'ans[count]' gives segfault.

Ancient Dragon commented: right :) +36