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

As stated in the job offer notification, is our basic salary of $7,500.00USD, good for you if employed? In case of any eventuality, who is your next of kin?

1 Answers   GE,


Sketch a velocity time graph for a skydiver jumping out of a plane.

0 Answers  


What filter types are there?

1 Answers  


as a fresher what is the format for resume and suggest me some career objectives too........

0 Answers  


Paul the octopus who has been forecasting the outcome of FIFA world cup matches with tremendous accuracy has now been invited to predict ICC world cup matches in 2011. We will assume that the world cup contenders have been divided into 2 groups of 9 teams each. Each team in a group plays the other teams in the group. The top two teams from each group enter the semi finals ( after which the winner is decided by knockout). However, Paul has a soft spot for India and when India plays any team, Paul always backs India. Alas, his predictions on matches involving India are right only 2 out of 3 times. In order to qualify for the semi finals, it is sufficient for India to win 7 of its group matches. What is the probability that India will win the ICC world cup?

1 Answers   TCS,






How many codes are used when u design a Pressure Vessel

0 Answers  


what is the difference between electrical engineering and electronic engineering.

3 Answers  


what is the difference between embedded system and PLC. Whether the micro controller accept future expansion of program?

0 Answers  


I want the syllabus of Section Enginner(Signal & Telecom) of RRB Exam

0 Answers  


What is smoke testing?

1 Answers  


what are the simlerities between macro and subroutine

0 Answers   TCS,


THREE IS EQUAL TO FOUR

2 Answers   InterSolution,


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