How do you prevent buffer overflows in C?

Answers were Sorted based on User's Feedback



How do you prevent buffer overflows in C?..

Answer / nashiinformaticssolutions

• Use bounds checking while working with arrays.
• Use safer functions like snprintf() instead of sprintf().

Is This Answer Correct ?    0 Yes 0 No

How do you prevent buffer overflows in C?..

Answer / glibwaresoftsolutions

• Use bounds checking while working with arrays.
• Use safer functions like snprintf() instead of sprintf().

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

How can I set an array's size at run time?

9 Answers  


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

2 Answers   Subex, Wipro,


Find occurence of a character in a sting.

3 Answers   TCS,


What is a symbolic constant?

1 Answers  


is it possible to change the default calling convention in c ?

1 Answers   Aptech,


Compare interpreters and compilers.

0 Answers  


What are the types of arrays in c?

0 Answers  


what is the hexidecimal number of 4100?

16 Answers   Google,


The C language terminator is a.semicolon b.colon c.period d.exclamation mark

6 Answers   TCS,


Define Array of pointers.

0 Answers  


How can I read in an object file and jump to locations in it?

0 Answers  


What is meant by global static? why we have to use static variable instead of Global variable

4 Answers   L&T,


Categories