out of fgets() and gets()which function is safe to use and
why in c language?



out of fgets() and gets()which function is safe to use and why in c language?..

Answer / pragati priya

The function fgets() function is safer to use. It checks the
bounds, i.e., the size of the buffer and does not cause
overflow on the stack to occur. gets() does not check the
bounds.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Engineering AllOther Interview Questions

Who is responsible for PLLs?

1 Answers  


if u r using bugzilla then it generates automatic bugids,while testing uhave got a bug then bug is represented through a bug id say bug1, then bug is assigned to developer he fixes a bug ,say the bug is fixed no error is got later after few regression cycles u have got the same bug but the bug is represented by diff id say bug2,tell me how do i come to know that it is the same bug that had occured previously but now it is represented by diff id

0 Answers  


Who secured the first hat trick in the 20 - 20 match ? a) symond b)balaji c) muthaiya muralidharan

2 Answers  


is there eligible for computer science engg students to write exams and how much percentage we want to attempt exam based on degree

0 Answers  


Explain different parts of an instruction. What does the addressing mode bit specifies?

0 Answers  


Discuss the various process operations, clearly stating what is involved in each process operation.

0 Answers  


what is the difference b/w "print" and "sprint" in sql?

0 Answers  


pls i need a help from you friends, is there anybody who can help me out with the question been ask from the USA embassy. i will be going for interview next month pls help me

0 Answers  


How would you Update the rows which are divisible by 10, given a set of numbers in column?

0 Answers  


what is defect tracking in sotware testing

0 Answers  


can any give an exact example about, resolving the sql errorcode -305

0 Answers   TCS,


why only j2me is used for mobile???

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)