hey,
thanks all for the help.
I tried using fflush just before calling scanf function like:
fflush(stdin );
scanf("%c",ch);

..the problem persists..it never ask for the input option once it has taken .and it contains "\n" as value.
i use freebsd platform and gcc compiler.