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

what is the diffeence between SQL and ORACLE?

0 Answers  


difference between user and kernel mode?

0 Answers   TCL,


Can you connect Active Directory to other 3rd-party Directory Services? Name a few options.

0 Answers  


If you had a cylinder, sealed at both ends, with the pressure rising inside, would it blow at the end or split along the side first?

0 Answers  


What were the most energizing/enjoyable aspects of your job in this given period?

0 Answers  






Given a number (N), program to check whether its binary form has periodic or not

0 Answers  


What are the fundamental differences between Engineering and Physics?

0 Answers  


How will a tester be sure that He’s covered the entire functionality in his Test case and not missed out anything?

0 Answers  


what is the cycle between AHU and Chiller

0 Answers   RotoPower,


how 2 write a program of this pattern usin for loop?? 1 2 3 4 5 6 7 8 9 10

0 Answers  


what are the examples of E-Based Applications?

1 Answers  


A rectangular plank (2)1/2 meters wide can be placed so that it is on either side of the diagonal of a square shown below.(Figure is not available) What is the area of the plank?

1 Answers   Google, Mu Sigma,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • 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)