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 3221986
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:56:21+00:00 2026-05-17T15:56:21+00:00

how do i do that? well i want to check if the array is

  • 0

how do i do that? well i want to check if the array is empty

  • 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-05-17T15:56:22+00:00Added an answer on May 17, 2026 at 3:56 pm

    Actually, when you have an array a[SIZE], you can always check:

    if( NULL == a )
    {
    /*...*/
    }
    

    But it’s not necessary, unless you created a dynamic array (using operator new).

    See the other answers, I won’t delete it just because it’s accepted now. If other answer is accepted, I’ll delete this “answer”.


    EDIT (almost 4 years later 🙂 )

    As I get many down-votes for this, I’d like to clarify: I know this is useless and a will never be NULL, but it technically answers the question about the NULL part.

    Yes, it does NOT mean, the array is empty, NOT at all. As @JamesMcNellis notes below, arrays cannot be NULL, only pointers.

    It could only be useful for dynamically allocated arrays with initialized pointer before the allocation.

    Anyway, I’ll wait for accepting other answer and will delete mine.

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

Sidebar

Related Questions

Can someone recommend a secure FTP implementation that works well on Windows Server 2000?
I'm looking for a Java profiler that works well with the JVM coming with
I have written a few MSBuild custom tasks that work well and are use
I am looking for a good, free (preferred) screen sharing program that works well
I have this RewriteRule that works too well :-) RewriteRule ^([^/]*)/$ /script.html?id=$1 [L] The
I have an application that works pretty well in Ubuntu, Windows and the Xandros
I have a JavaScript snippet that runs very well on Firefox and Safari, but
Some days ago I realized that PrintWriter (as well as PrintStream ) never throw
I had a parametrized insert statement that was working well and I needed to
We currently maintain a suit of MFC applications that are fairly well designed, however

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.