About 20,700,000 results
Open links in new tab
  1. gets () function in C - Stack Overflow

    Dec 3, 2010 · The Early Bug gets () the Internet Worm The problems in C are not confined to just the language. Some routines in the standard library have unsafe semantics. This was …

  2. Why is the gets function so dangerous that it should not be used?

    The gets() function does not perform bounds checking, therefore this function is extremely vulnerable to buffer-overflow attacks. It cannot be used safely (unless the program runs in an …

  3. C - scanf () vs gets () vs fgets () - Stack Overflow

    Jul 10, 2015 · And the difference between gets/scanf and fgets is that gets(); and scanf(); only scan until the first space ' ' while fgets(); scans the whole input. (but be sure to clean the buffer …

  4. c - gets () does not work - Stack Overflow

    Oct 1, 2009 · I have a program written in C and it calls gets() from a switch when a user chooses the option of 3. Here is my code. It does not seem to wait to wait for the user to input …

  5. Why was the gets function removed instead of just changing its ...

    Jun 20, 2025 · 2 Why was the gets function removed instead of just changing its signature? At least in part because removing gets() from the language specification does not mean that …

  6. gcc - gets () problem in C - Stack Overflow

    Oct 21, 2012 · 0 gets is dangerous because it lets you read in more data than you've allocated space for, you can use fgets which specifies how many characters it is going to read in and …

  7. c - Difference between fgets and gets - Stack Overflow

    Feb 9, 2015 · The problematic difference between gets and fgets is that gets removes the trailing '\n' from an input line but fgets keeps it. This means an 'empty' line returned by fgets will …

  8. c - Disable warning: the `gets' function is dangerous in GCC …

    I am using the function gets () in my C code. My code is working fine but I am getting a warning message (.text+0xe6): warning: the `gets' function is dangerous and should not be used.

  9. Why is gets() not consuming a full line of input? - Stack Overflow

    Nov 20, 2022 · Since gets () or fgets () is getting skipped due to an already present '\n' from previous inputs in stdin, calling getchar () would lead to itself getting skipped instead of gets () …

  10. Difference to get string with gets and fgets in C - Stack Overflow

    Feb 23, 2024 · fgets is a standard library function, gets is a withdrawn function no longer used. It was flagged obsolescent somewhere in the 1990s (30 years ago!) and finally removed entirely …