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

I've got an after insert trigger that works well. However, I want it to
I want to be able to read any well-formed RSS/ATOM file. That would mean
I have a map that represents a DB object. I want to get 'well
I'd like to know how to check an array that got several variables in
I use Jackson and want to check that input JSON string doesn't contain duplicated
I'm using the Zend Framework and I want to check that certain fields are
I have a UIDatePicker that well, allows you to select a date (not time).
I`v made my webpart that works well (I can add it to page and
I have this linq query that works well (although it may be written better,
We have a Perl program that ran well on all Windows platforms so far.

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.