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

    Dec 3, 2010 · I thought it is pretty cool to use the gets() function because it is like the scanf() wherein I could get an input with whitespace. But I read in one of the threads (student info file …

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

    Why is gets() dangerous The first internet worm (the Morris Internet Worm) escaped about 30 years ago (1988-11-02), and it used gets() and a buffer overflow as one of its methods of …

  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. What is gets () equivalent in C11? - Stack Overflow

    Oct 15, 2012 · 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 …

  5. How to use "gets" and "gets.chomp" in Ruby - Stack Overflow

    I learned that gets creates a new line and asks the user to input something, and gets.chomp does the same thing except that it does not create a new line. gets must return an object, so you …

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

    Nov 20, 2022 · I'm trying to use gets() to get a string from the user, but the program seems to be passing right over gets(). There is no pause for the user to give input. Why is gets() not doing …

  7. What's the difference between gets and scanf? - Stack Overflow

    Oct 28, 2014 · gets - Reads characters from stdin and stores them as a string. scanf - Reads data from stdin and stores them according to the format specified int the scanf statement like %d, …

  8. What is the difference between gets () and getch ()?

    Feb 20, 2014 · The gets function is used for returning zero or more characters from the standard (console) input. Edit 1: Depending on your compiler implementation, the getch function may be …

  9. 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 …

  10. 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.