answersLogoWhite

0

How is an array specified?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

int a[100];

char b[50];

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How is an array specified?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What degrees is Array Azimuth specified as?

degrees


What does it mean to have a string split in java?

To have a string split in Java means that a string array, containing substrings (can be delimited by elements of a specified string or Unicode character array), is returned.


What restriction must be satisfied by all of the data items represented by an array?

An array is a group of related items that share a common name.All these elements are stored consecutively. An array must be declared before its use in the program. Array size must be specified All Array elements must be assigned to any value for assignment the value. Partial initialization of elements of an array is not allowed. Size must be integer constant enclosed within square brackets The name of the array indicates starting address of an array. Each individual element of array is accessed by a subscript.


Which function used to read characters into an array specified by its parameter?

Examples: recv, read, fread, gets, fgets, scanf, fscanf


What is the requirement of an array?

The two main requirements of an array are: * Its size should be specified while declaration. This size cannot change. * It can contain only homogeneous elements as its values. i.e., for example an array can contain either all int values or all char values etc. It cannot take values of different data types


What odes online medical billing school teach?

Depending on the specified college you are going to want to qualify for. They teach you array vast subjects that one school may teach but not another.


What would happen if you put too few elements in an array when you initialize it?

If the array does not have an initial size parameter, the array would be the size of the initialization vector, so you would not be able to store any data beyond the end of those elements without crashing your program or causing memory bugs. If there is a specified array size and the initialization vector is smaller than that size, then all remaining elements will be set to the value 0; it is not an error to not specify all elements in the initialization vector.


How you can use array in c language?

An array is a contiguous block of memory containing one or more elements of the same type and size. Each element in the array is accessed as a zero-based offset from the start of the array or by using the index []. Examples: int a[10]; // allocates memory for 10 integers (e.g., 40 bytes for a 4 byte int). int x = a[5]; // accesses the 6th element (a[0] is the first element). int *p = a; // point to start of the array. p += 5; // advance pointer 5 * sizeof( int ) addresses. *p = 10; // access the 6th element and assign the value 10. int d * = new int[*p]; // dynamically allocate an array of 10 elements. delete [] d; // release dynamic array.


Differentiate single dimensional array to double dimensional array?

A single dimensional array is an array of items. A two-dimensional array is an array of arrays of items.


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.


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 is array literal in as2?

An array literal is a comma-separated list of the elements of an array. An array literal can be used for initializing the elements of an array.