answersLogoWhite

0


Best Answer

Like this.

OOOO

OOOO

OOOO

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is an array of 3 x 4?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the array of 20?

It can be 1 x 20 or 2 x 10 or 4 x 5


How do you write a description of an array using the product of 3 x 15?

product of 3 x 15


How 3d arrays are represented in memory?

All multi-dimensional arrays are represented as arrays of arrays. That is, each element of the array is itself an array. Thus a two-dimensional array can be thought of as being a one-dimensional array where every element is a one-dimensional array. A three-dimensional array is therefore a one-dimensional array of two-dimensional arrays. And so on. The actual memory layout of a multi-dimensional array is no different to that of a one-dimensional array of the same size: int a[12]; int b[3][4]; Assuming a 4-byte int, the amount of memory allocated to a is 12 x 4 = 48 bytes. The array b is essentially an array where each element holds an array of 4 integers, thus each element is 16 bytes in length. Given there are 3 such elements in total, the total size of b is 3 x 16 = 48 bytes, the same as was allocated to a. Although the allocations are exactly the same in terms of size, the layouts differ. The array a is an array of twelve 4-byte elements (of type int) whereas array b is an array of three 16-byte elements, each of which is itself an array of four 4-byte elements (of type int). This changes the way we refer to the individual elements of the array. Every element in an array is referred to by its offset address from the start of the array. This is determined by multiplying its zero-based index by the element size. In the case of a, every element is 4-bytes in length, thus element a[2] refers to the element that is offset 2 x 4 = 8 bytes from the start of the array. But in the case of b, however, b[2] would refer to the 16-byte element that is offset 2 x 16 = 32 bytes from the start of the array. Given that we're actually referring to an element which is itself a 4-element array, we must use a second subscript to refer to the elements of that array. Thus b[2][3] would refer to the integer that is offset 3 x 4 bytes from the start of the array referred to by b[2]. Extending this idea into three-dimensions is simply a matter of taking a third subscript into account.


What is an array of 5 x 46?

An array is a contiguous memory allocation divided into one or more elements of equal size. A 5 x 46 array is an array of 5 elements where each element is another array of 46 elements. In other words it is an array of arrays. We can the array a two-dimensional array because it has 5 elements in one dimension (the rows) and 46 in the other dimension (the columns). If an individual column element is 4 bytes long, then each row element consumes 46 x 4 = 184 bytes of memory while the entire array consumes 5 x 184 = 920 bytes in total. We can also think of the entire array as being a one-dimensional array of 5 x 46 = 320 elements of 4 bytes each.


What is meant by irregular dimensional array?

An irregular dimensional array is a special type of multi-dimensional array.First we must understand that a multi-dimensional array is just an array of arrays. Each element in the array is, itself, an array of elements.A regular multi-dimensional array will be an array of size n, with each element containing a separate array of size m. That is, each sub-array has the same size.An irregular multi-dimensional array will be a multi-dimensional array in which each sub-array does not contain the same number of elements.Regular array:array[0] = new array{0, 1, 2}array[1] = new array{3, 4, 5}array[2] = new array{6, 7, 8}array[3] = new array{9, 10, 11}This regular array is an array of size 4 in which each sub-array is of size 3.Irregular array:array[0] = new array{0, 1, 2}array[1] = new array{3, 4}array[2] = new array{5, 6, 7}array[3] = new array{8, 9, 10, 11}This irregular array is an array of size 4 in which the size of each sub-array is not the same.


What is meant by redim in vb?

The ReDim command reallocates the storage space of an array variable.So for example, if you did the following:Dim Arr_TestArray(9, 2) as IntegerTo create an integer array with 10 x 3 elements, and wanted to resize it to 5 x 5 elements you would do the following:ReDim Arr_TestArray(4, 4)You will however lose all the existing data stored in that array unless you use the Preserve command alongside it.(Note: Arrays have a zero element in .net so by declaring an array length of 4, it will ifnact have 5 elements)


How do you access the elements of double dimension arrays?

Working with two-dimensional arrays is really no different to working with a one-dimensional array. A two-dimensional array is really just a one-dimensional array where every element is a one-dimensional array. int x[4]; Here, x is a one-dimensional array of 4 elements of type int. int y[3][4]; Here, y is two-dimensional, however it's actually a one-dimensional array of 3 elements where each element is exactly the same type as x; an array of 4 elements of type int. The biggest problem with multi-dimensional arrays is when we pass arrays into functions. An array implicitly decays to a pointer so we lose all information regarding the dimensions when we pass them to functions. Thus we have to pass the dimensions as separate arguments. However, a two-dimensional array does just decay to a point it decays to a pointer-to-pointer. That is, each dimension adds another level of indirection. The following example demonstrates how to pass a multi-dimensional array to a function: #include<stdio.h> void print2d (int* a, unsigned rows, unsigned cols) { for (unsigned r=0; r<rows; ++r) { for (unsigned c=0; c<cols; ++c) printf ("%d\t", a[r * cols + c]); printf ("\n"); } } int main() { int x[3][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}; print2d (&x[0][0], 3, 4); return 0; } Note that we don't have this problem in C++ because we can use std::array and std::vector objects, which are much easier to work with and just as efficient as any built-in array.


How do you swap two adjecent no in array in c?

Option 1) Use a temporary variable: int x = array[i]; array[i] = array[i+1]; array[i+1] = x; Option 2) Use bit operators: array[i] ^= array[i+1] ^= array[i];


What are the dimensions of an array of 3x6?

The dimensions are 3 x 6. Also, since there are two numbers, you might say it is a 2-dimensional array.


What is an Array dimension?

An array dimension tells us the number of elements in an array:int x[50]; // an array of 50 integer elementsArray elements are anonymous so we cannot refer to them by name. The array name, x, refers to the start of the array and thus to the first element in the array but it's important to realise that x really is a reference and not a named variable:x = 42; // error! cannot assign a value to a referenceIn order to assign a value to an array element you must first dereference that element:*x = 42;The first element of an array is always offset 0 elements from the start of the array, so we can also use pointer arithmetic to dereference the address:*(x+0) = 42; // assign to the 1st elementBy changing the offset index we can refer to any element in the array:*(x+10) = 42; // assign to the 11th elementDereferencing array elements using pointer arithmetic is a bit verbose and cumbersome, however we can use the array suffix operator to make things a little easier for both the programmer and the reader:x[0] = 42;x[10] = 42;As far as the C compiler is concerned, x[0] really means *(x+0). The pointer arithmetic still occurs behind the scenes, but it is an implementation detail that is of no real concern to the programmer. However, in order to understand how arrays work, it is important we understand the underlying pointer arithmetic.Note that the array suffix operator should not be confused with the array declarator:int x[50]; // declaratorx[10] = 42; // suffix operatorThe declarator tells the compiler how many elements of the given type to allocate (the dimension), while the suffix operator tells the compiler which element to dereference.The notion of dimensions can be extended to create multi-dimensional arrays.int y[5][10]; // two-dimensional arrayTwo-dimensional arrays are best thought of as being one-dimensional arrays of one-dimensional arrays. Here, y is a one-dimensional array of type int[10]. We can also think of them as being a table of rows and columns where every row is an array. The dimensions therefore tell us how many rows and columns there are in the table.We can extend this line of thinking into three dimensions:int z[3][4][5]; // three dimensional arrayHere we have an array of 3 tables, where every table has 4 rows and each row has 5 elements of type int. Although we can imagine such an array as being a cuboid or as a stack of tables, it's always much easier to think one-dimensionally as it helps our understanding of arrays with more than 3 dimensions.In this case it is better to think of z as being an array of 3 elements of type int[4][5], and each of those arrays as being an array of 4 elements of type int[5]. Extending the notion into 4 or more dimensions then becomes trivial:int m[2][3][4][5];Here, m is a one-dimensional array of 2 elements of type int[3][4][5].Note that the C programming language is a row-major language, thus with multi-dimensional arrays the row always comes first. In other words, m is a one-dimensional array of two rows, where every row is an array of type int[3][4][5]. Similarly, int[3][4][5] is a one-dimensional array of 3 rows of type int[4][5]. And so on.Array elements are always allocated contiguously regardless of the number of dimensions. To determine the size of an array allocation in elements we simply multiply the dimensions. Thus m has sufficient memory to store 2*3*4*5=120 elements. To determine the length in bytes, we multiply the product of the dimensions by the size of the array type. Thus m is 120*sizeof(int) bytes in length.


What is the answer for x - 4 3?

okay if x-4=3 then x=7 bcause 4+3=x = 4+3=7 and 7-4=3!


X - 3 divided by 12 - 4x?

(x - 3)/(12 - 4x) = (x - 3)/[4(3 - x)] = (x - 3)/[-4(x - 3)] = 1/-4 = -(1/4)