Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is the difference between null array and an empty array?
I will give you some important difference b/n null & empty array.

1.Due to difference in memory allocation, Null array has not allocated memory spaces.Where as Empty array has memory allocated spaces.
2.In an Null array object are not assign to the variables, Where as in an empty array object are assign to the variables.
  Suppose, It we want to add some values in both array than in case of Null array first we have to assign the object to the variables after that we have to add values.Where as in case of Empty array we have to only add the values.
3.When we declare int* arr[] as globel it has only null that means it is an null array.
When array has 0 elements is called empty array.