well thanks poppy_123
but i have only C under practice for now
ABS c-faq.com is indeed a very valuable resource for C developers and i really didn't know before now about it ,,and i would recommend any one to have the book published by Addison-Wesley
but
i have tried gets() before but it just will keep reading until user hits Enter and that can be used to over-run my buffer like mentioned here
Quote:
Since the user cannot specify the length of the buffer passed to gets(), use of this function is discouraged. The length of the string read is unlimited. It is possible to overflow this buffer in such a way as to cause applications to fail, or possible system security violations.
It is recommended that the fgets() function should be used to read input lines.
i really would like to stick with scanf() until i find a way to clear the buffer i will try fgets()