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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

If I am in a room with 5 people and guess all their birthdays what is the probability of getting (only) one correct?

754


What is the strongest naturally occurring material and how can it be cut?

606


briefly explain about your project? please tell me about this answer . my current project is ERP domain web based application.please please help me

1609


Explain momentum?

598


i want to know ,If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits.

1720






can u tell me placement peoceduers and placemnt format of hpcl.

1467


what is difference betweeen operator overloading & operator overriding?

1588


in b+ trees, all the data is stored in leaf nodes. if all leaf nodes are crashed then how to get/recovery the data back?

1513


Dear frds In my office we are using chiller . in that chiller inlet and outlet water diff. is 2.5 decgree always. if i intduce the cooling tower can i get good result in chiller Inlet water. reply plz.

1469


Given two strings, find the sub-string of the first string having minimum length which is having all the characters in second string

1646


what does static variable mean in c language?

1811


What is the Boundary value analysis and Equlance class partition for select * from emp

1774


Why did they used to make the mill chimneys so tall?

760


what are purchase order , sales order idoc names and idoc types

1682


in which website , i can able to get the electrical basics.?????????????

1367