Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Why the use of alloca() is discouraged?

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


Please Help Members By Posting Answers For Below Questions

Explain about block scope in c?

1050


How can I read/write structures from/to data files?

937


Write a code to generate divisors of an integer?

1021


What are types of preprocessor in c?

1031


Explain the difference between exit() and _exit() function?

1128


Where local variables are stored in c?

972


How can I find out if there are characters available for reading?

1082


How do I read the arrow keys? What about function keys?

1033


What is a newline escape sequence?

1070


How can a process change an environment variable in its caller?

1154


Explain the process of converting a Tree into a Binary Tree.

2627


Can a variable be both constant and volatile?

1069


How can I recover the file name given an open stream or file descriptor?

1046


What is a const pointer?

1060


What is a header file?

1047