Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   ISSUE in using gets( ) with switch case.. (http://www.go4expert.com/forums/issue-using-switch-t6203/)

arvind_khadri 5Sep2007 01:23

ISSUE in using gets( ) with switch case..
 
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 5Sep2007 01:43

Re: ISSUE in using gets( ) with switch case..
 
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.


All times are GMT +5.5. The time now is 23:44.