What is alloca() and why is its use discouraged?
Answer / guest
alloca() allocates memory which is automatically freed when
the function which called alloca() returns. alloca() cannot
be written portably, is difficult to implement on machines
without a stack, and fails under certain conditions if
implemented simply.
| Is This Answer Correct ? | 5 Yes | 0 No |
main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?
7 Answers AMCAT, HCL, Ramco, Zycus Infotech,
What was noalias and what ever happened to it?
What is the use of structure padding in c?
Do you know the difference between exit() and _exit() function in c?
write a program in c to print **** * * * * ****
How many types of arrays are there in c?
what is inline function?
can we store values and addresses in the same array? explain
Under what circumstances does a name clash occur?
What is static and volatile in c?
a simple c program using 'for' loop to display the output 5 4 3 2 1
How do you determine the length of a string value that was stored in a variable?