hey wat is d use of gets( ) function in C..?:?:

Narue commented: This isn't a chat room. Learn to spell your words properly. -4

Recommended Answers

All 5 Replies

Right from my linux/GNU man file

BUGS
Never use gets(). Because it is impossible to tell without knowing the data in advance
how many characters gets() will read, and because gets() will continue to store charac‐
ters past the end of the buffer, it is extremely dangerous to use. It has been used to
break computer security. Use fgets() instead.

commented: Indeed, it is so. +19

i askd wat is d use of gets() function.......

commented: ZOMGLOLWTFBBQ!!!!!!!!!!!!!!!!!!!!1 -1
commented: c'mon +0
commented: Do you really think you're so important? Use Google and figure it out yourself the next time. -1

Thank u......

hey wat is d use of gets( ) function in C..?:?:

  • It's an unsafe function that should never be used.
  • When found in code, its presence prompts more experienced programmers (those with more than say, 1 day of C programming under their belts) to pound on the pathetic, poor, foolish rookie who put it in his code.
  • The function generally prompts the posting of copious links telling you never to use the function.
  • It is a function that if used in code indicates to others that the programmer has absolutely no idea how to program in the C language.

;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.