ISSUE in using gets( ) with switch case..

arvind_khadri's Avatar, Join Date: Sep 2007
Go4Expert Member
am having trouble using gets( ) in switch case...its not takin in the string at all...its actually skippin tat statement...but whereas if i use scanf( ) the code works.....wat probably is happening inside????
DaWei's Avatar, Join Date: Dec 2006
Team Leader
Show your code. Be sure and put in inside code tags (see the "Before you make a query" thread). You should never use gets (). It doesn't allow you control the maximum length, thus is often the cause of buffer overflows. You can use fgets (), instead.