answersLogoWhite

0

C provides rectangular multidimensional arrays.

In C, a two-dimensional array is really a one-dimensional array, each of whose elements is an array.

An array is initialized by a list of initializations in braces; each row of a two-dimensional array is

initialized by a corresponding sub-list.

Example of two dimensional array initialization:

char array_example[2][4] = {

{11, 12, 13, 14},

{21, 22, 23, 24}

};

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

Declaration of two dimentional array in functions?

Possible. void foo (void) { int array [10][20]; ... }


What does a 2 dimensional array do?

A two dimensional array is a one-dimensional array of one-dimensional arrays. That is, just as we can have an array of integers, we can also have an array of integer arrays. This idea can be extended such that we can have an array of two-dimensional arrays (a three-dimensional array), and so on. We typically use a two-dimensional array to represent a table of rows and columns, where each row is a one-dimensional array.


Is run time initialization of an array an initialization or an assignment?

It is an initialisation. You cannot assign values to a dynamic array until it has been initialised. Static arrays can be initialised at compile time. They can also be assigned at compile time. void main() { // Compile time: // ========= // Initialise a static array. int arr1[10]; // Initialise and assign a static array. int arr2[10] = {0,1,2,3,4,5,6,7,8,9}; // Runtime: // ====== // Dynamic array (size unknown, no memory allocated) int* pArr[]; // Initialise (size known, allocate memory, 40 bytes): pArr = ( int* ) malloc( 10 * sizeof( int )); // Assign (set values of elements): int x; for(x=0;x<10;++x) pArr[x] = x; // Uninitialise (release memory). free( pArr ); return( 0 ); }


What will be the Flowchart for adding all elements in an array in c plus plus?

It is not possible to show a flowchart in this website -- it is text only. The algorithm can be summarised as follows: int sum(std::array<int>& a) { int sum = 0; // initialise the return value for (auto i : a) // for each value in the array sum += i; // increment the sum by the value return sum; // return the sum }


How do you merge two array without using function?

Take another array big enough to hold both array copy content of these two array into new one. You merged two array and haven't used a single function.!

Related Questions

What is example of two dimentional array?

a matrix


What are the kinds of arrays?

1. One dimension array 2. Two dimension array 3. Multi dimentional array


Declaration of two dimentional array in functions?

Possible. void foo (void) { int array [10][20]; ... }


How many dimensions does a two dimentional figure have?

A two dimentional figure has two dementions.


What does a 2 dimensional array do?

A two dimensional array is a one-dimensional array of one-dimensional arrays. That is, just as we can have an array of integers, we can also have an array of integer arrays. This idea can be extended such that we can have an array of two-dimensional arrays (a three-dimensional array), and so on. We typically use a two-dimensional array to represent a table of rows and columns, where each row is a one-dimensional array.


Is a rectangular prism a polygon?

no. the definition of polygon is two dimentional and a prism is three dimentional


What is one dimentional array?

A One dimensional array is one in which a set of values are present in it. Ex: int[] myArray = new int[4]; The above statement creates a one dimensional array that can hold 4 values.


Dope vector method for one dimentional array?

Dope Vector Method is use for one dimensional array and also two-dimensional array for one dimensional array we use MA(i)=sa+(i-1)*w MA is Memory Address Sa = Start Address i is subscript W for integer w=2 float=4 char=1 for two dimensional array MA(i,j)=SA{n(i-1)+(j-1)}*W


What two-dimentional shapes are most often associated with three-dimentional forms?

Lines of symmetry


What is single dimentional?

A single dimension array is an array with one dimension. It is a collection in memory of one or more elements of the same type. int array[100]; declares an array of int's of size 100 elements. The elements are referenced as array[0], the first one, through array[99], the last one.


A what is a two-dimentional pattern that can be folded into a folded three-dimentional polyhedron?

i don't know the answer i just want to find it


Sample program of single-dimentional array?

#include "stdio.h" #define SIZE 100; void main() { int array[SIZE], i, size; printf("\nEnter the Size off Array :- "); scanf("%d", &size); printf("\nEnter the Elements of Array :- ")' for(i = 0; i < size; i++) scanf("%d", &array[i]; printf("\nThe Elements of entered Array :- "); for(i = 0; i < size; i++) printf("%7d", array[i]); }

Trending Questions
What is voltage of a circuit with 15 amps of current andtoaster with 8ohms of resistance? Why are oil refineries so far away from populated areas? Can you use ac ammeter to measure dc current? What are the purposes of a technical writing? What is steel shim spike protectionon work boots? Can you steam clean sealed slate floors? A differential pressure transmitter is to be calibrated to read level of a closed vessel The dimensions of the closed vessel are as given below What would be the calibration range of the transmitter? What is the best underfloor heating system for a reasonable price? How is the shipping industry protecting the waterways against oil spills? What plumber should do to install central heating system? What happen to DC level when Voltage-Division is adjusted to any value? How do you get a grant for a new boiler? There is an elevator in a sixteen story office building You must design a sequential control circuit for the elevator that uses D-flip flops What if your circuit has two available inputs an input X wh? How do you create a loop in f sharp? What causes genetic disorders are permanent changes in the DNA sequence? What is the BNF of the for loop? How do you use conditional in a sentence? What is true about true about abstract data type Object of an abstract class type cant be created. We can derive classes from these abstract classes Object of an abstract class t? How much steel required for 1cum of concrete? What causes a broken or fractured camshaft?