What is alloca() and why is its use discouraged?



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

Post New Answer

More C Interview Questions

If I have a char * variable pointing to the name of a function ..

1 Answers  


what are you see during placement time in the student.

0 Answers   Goldman Sachs, TCS, Tech Solutions,


what is an array

5 Answers  


find a number whether it is even or odd without using any control structures and relational operators?

22 Answers   Microsoft, Shashank Private Limited,


Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?

1 Answers   Oracle,


What are dynamically linked and statically linked libraries?

2 Answers  


Write one statement equalent to the following two statements x=sqr(a); return(x); Choose from one of the alternatives a.return(sqr(a)); b.printf("sqr(a)"); c.return(a*a*a); d.printf("%d",sqr(a));

6 Answers   TCS,


What are local static variables? How can you use them?

1 Answers  


Write a program to find whether the given number is prime or not?

6 Answers  


why should i select you?

21 Answers   Wipro,


What is difference between far and near pointers?

1 Answers  


What is dynamic variable in c?

1 Answers  


Categories