answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

What happens if an array overrun occurs in java?

If you mean that you try to access an index outside of the bounds of the array, then it will result in an IndexOutOfBoundsException being thrown.


What is an array for 2 times 3?

An array of 2 times 3 is a one-dimensional array of 2 elements each of which is a one-dimensional array of 3 elements. In other words, it is an array of arrays, also known as a two-dimensional array. We can imagine a two dimensional array as being a table with rows and columns. A 2 times 3 array has 2 rows and 3 columns. Each row is itself an array of 3 elements. However, we can also say that each column is an array of 2 elements.


How do you pass an array to a copy constructor in c plus plus?

You cannot pass an array to a copy constructor. A copy constructor only accepts a constant reference to the object being copied, which must be of the same class as the object being constructed. An array is not an object of any class, and therefore cannot be used in any copy constructor. Although you cannot pass an array to a copy constructor, you can pass an array to a non-trivial constructor. It is not recommended, however, as there's no way to bounds-check the array being passed, which could result in an invalid object being created -- which is never a good thing. Even if you pass the array and its dimension(s) to the constructor, how can you guarantee those dimensions are valid for the array being passed? And what will you do if they are invalid? After all, you cannot veto the construction of an object once you've called its class constructor. Not knowing why you want to pass an array to a copy constructor, or how you intend to initialise the members via an array, makes it somewhat difficult to determine the best solution for you. However, I would consider using mutators instead of constructors. There's still the problem with bounds-checking but at least you won't have to deal with it during the object's construction.


What does vast array mean?

a regular and imposing arrangement; disposition in regular lines


What is the difference between a fixed size array and a variable size array?

The obvious answer is that one has a constant size while the other does not. More specifically, a fixed-size array is one where the size is known at compile time and does not change at runtime. By contrast, the size of a variable-sized array may or may not be known at compile time but may change at runtime. We often refer to a variable-size array as being a dynamic array, however some people (myself included) incorrectly refer to a fixed-size array as being a static array. The misunderstanding largely comes from the fact that we often refer to the heap (or free store) as being dynamic memory because all dynamic variables are allocated there (including variable-size arrays). But the term dynamic array does not refer to the memory, it refers to the dynamic -- as in changeable -- nature of the array itself. By contrast, a fixed-size array is only deemed static if it is statically allocated, in which case it will be allocated in the program's data segment along with all other static variables, global variables and constants. But a local fixed-size array is allocated on the program's stack and is therefore, by definition, non-static. Moreover, you can allocate a fixed-size array on the heap!

Related Questions

Does being charged with something mean its on your record?

Yes. If you are "charged" it will appear on your record.


What happens if an array overrun occurs in java?

If you mean that you try to access an index outside of the bounds of the array, then it will result in an IndexOutOfBoundsException being thrown.


What does it mean when the battery light comes on in a 1988 f150?

Your battery is not being charged


If you are being held for extradition on the felony murder warrant does that mean you have been charged?

Yes, you are charged for murder and will soon be returned to the location where you committed the crime.


What does a steady battery light mean IN A 1997 Ford Expedition?

The battery isn't being charged


What does an orange light mean on a Nintendo DSi XL?

The orange light means the console is being charged.


Does a mobile phone vibrate when being charged?

No it doesnt and wont vibrate when it is being charged.


What happens in a battery when being charged?

its getting charged!!


What does it mean when the battery light comes on for a 2000 ford ranger?

Your battery isn't being charged or accepting a charge


Who is the patron saint of manners?

I have checked and there is no particular saint charged with being the patron of manners. Or did you mean to write"mariners?"


What does square brackets mean?

It means indexing into an array. The array could be an array of built in primitive types or array of objects. The index must be a numeric value greater than or equal to 0.


What is a multi array?

A two-dimensional array is the simplest multi-dimensional array and is implemented as a one-dimensional array where every element is itself a one-dimensional array. We can imagine a two-dimensional array as being a table of rows and columns where every row is an array in its own right. A three-dimensional array is simply a one-dimensional array of two-dimensional arrays, which can be imagined as being an array of tables. Extending the concept, a four-dimensional array is a table of tables. Multi-dimensional arrays may be jagged. That is, a two-dimensional array may have rows of unequal length. Unlike regular arrays, jagged arrays cannot be allocated in contiguous memory. Instead, we use the outer array (the first dimension) to store pointers to the inner arrays. An array of strings (character arrays) is an example of a two-dimensional jagged array.