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

Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


Is both getch() and getchar() functions are similar? if it is similar means why these two functions are used for same usage? if it is not similar means what is the difference?

1 Answers   Infosys,


How we can insert comments in a c program?

0 Answers  


Why c is called object oriented language?

0 Answers  


Is using exit() the same as using return?

0 Answers  






in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

0 Answers  


Write a program for the following series? 1 121 12321 1234321 123454321 12345654321 1234567654321 123456787654321 12345678987654321 1234567890987654321 123456789010987654321 12345678901210987654321 1234567890123210987654321 .........1234321............ ..........123454321............ ..........12345654321............ 7 8 9 0 1 Pls............?

5 Answers  


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

0 Answers   Wilco,


In a switch statement, explain what will happen if a break statement is omitted?

0 Answers  


what is difference between array,strutter,union and pointers

3 Answers   CTS, Lovely Professional University, Mannar Company,


a simple program in c language

5 Answers   IBM,


what is the height of tree if leaf node is at level 3. please explain

0 Answers  


Categories