Programming Languages
C++
Subjective
Mar 13, 2013
If you want to empty an array then how would you do that?
Detailed Explanation
We can empty an array by setting its length to any –ve number, generally -1 and by assigning null list
use strict;
use warnings;
my @checkarray;
if (@checkarray)
{
print "Array is not empty";
}
else
{
print "Array is empty";
}
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts