Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8047687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:10:47+00:00 2026-06-05T06:10:47+00:00

Unlike the malloc , I have never seen a if statement for checking whether

  • 0

Unlike the malloc , I have never seen a if statement for checking whether the array has got enough space. So is it guranteed that the arrays always get enough space even though they are allocated in the stack? And what to do in case otherwise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:10:48+00:00Added an answer on June 5, 2026 at 6:10 am

    No guarantee at all.

    There’s no way to verify whether the stack allocation was successful or not. The C standard doesn’t mandate any limits (min or max).

    So you should check with your operating system which typically allocates a fixed size stack. For example, on my Ubuntu system, the stack size is 1MB. So it depends on your operating system.

    In fact, if you start to have doubts whether stack size is enough, you should go for dynamic allocation (malloc).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 unlike tables and a large set of subqueries that have a
A web application has no make file unlike C++ or anything like that. However,
Unlike C++, C has no notion of a const_cast . That is, there is
I'm using Git for version control and unlike SVN I have not come across
Unlike new and delete expressions, std::malloc does not call the constructor when memory for
Unlike Java, Perl uses reference count for garbage collection. I have tried searching some
I used java after a long time and found out that unlike other languages
Unlike in java why c# does not have a supertype of Number for Floats,
I have a model not unlike the following: class Bike(models.Model): made_at = models.ForeignKey(Factory) added_on
I have an app using ListView not unlike Explorer does, but when I set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.