inserted procedure getAnswer for project2 - error: segmentation fault (core dump)