Why is it usually a bad idea to use gets()? Suggest a workaround.
The function gets() reads characters from the stdin and stores them at the provided input buffer. However, gets() will keep reading until it encounters a newline character. Unless the buffer is large enough, or the length of the line being read is known ahead of time, gets() can potentially overflow the input buffer and start overwriting memory it is not supposed to, wreaking havoc or opening security vulnerabilities.
| Is This Answer Correct ? | 1 Yes | 0 No |
implement OR gate without using any bitwise operator.
What is FIFO?
Ca some one please help me with aC code to allow user enter numbers from 1 to 20 without repeating and prnt the sum of those numbers thnx
What is the difference between #include and #include 'file' ?
What is a protocol in c?
difference between i++* and *++i
What is the purpose of #pragma directives in C?
program to print upper & lower triangle of a matrix
a linear linked list such that the link field of its last node points to the first node instead of containing NULL a) linked list b) circular linked list c) sequential linked list d) none
if function is declared as static in one source file, if I would like to use the same function in some other source file...is it possible....how ?
Is c procedural or object oriented?
What are global variables?