Answer Posted / johnson
Sorry, that is not strictly correct. According to the man page:
"The alloca() function allocates size bytes of space in the
stack frame of the caller, and returns a pointer to the
allocated block. This temporary space is automatically freed
when the caller returns."
Now this is the real reason:
" If the allocated block is beyond the current stack limit,
the resulting behavior is undefined."
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
Explain about block scope in c?
How can I read/write structures from/to data files?
Write a code to generate divisors of an integer?
What are types of preprocessor in c?
Explain the difference between exit() and _exit() function?
Where local variables are stored in c?
How can I find out if there are characters available for reading?
How do I read the arrow keys? What about function keys?
What is a newline escape sequence?
How can a process change an environment variable in its caller?
Explain the process of converting a Tree into a Binary Tree.
Can a variable be both constant and volatile?
How can I recover the file name given an open stream or file descriptor?
What is a const pointer?
What is a header file?