C Language

File Processing Question & Answer



Question : 1

Out of fgets() and gets() which function is safe to use and why?



Answer :

fgets() is safer than gets(), because we can specify a maximum input length. Neither one is completely safe, because the compiler can‘t prove that programmer won‘t overflow the buffer he pass to fgets ().



CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad