answersLogoWhite

0


Best Answer

If you mean how do you create an array with 16 elements, there are two ways:

int a[16]; /* fixed size array of 16 integer elements */

int* b = malloc(16*sizeof(int)); /* variable length array with (initially) 16 integer elements */

Remember that variable length arrays allocated on the heap must be released as soon as they are no longer required:

free (b);

b=NULL;

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you make a array with the number 16?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is The number of elements in an array is called?

the length of the array


This array field holds the number of elements that the array has?

length


What is dimentions arrays in java?

You can make arrays with any number of dimensions (depending on RAM limitations, of course). However, internally, a two-dimensional array (for example) is stored as an array of arrays; that is, each first-level array contains an array of the second level. Similarly with higher dimensions.


Why the index of an array be a positive number?

Since an array cannot contain a negative number of items, the size of an array must be at least 0. So if you ever tried to retrieve the element at a negative index in an array, it would automatically be understood to be out-of-bounds.


Full defecation of array?

Full representation of an array begins from the index 0 and ends at n-1 where n is the number of variables of the array.

Related questions

What array can you make to show the factors of 16?

You can create an array with some elements, get the factors of a number (such as 16), and while you get each of the factors, place the factors in the array. Every time you find a factor, divide the number by this factor before you search the next factor (to avoid getting the same factor over and over again).


What number between 12 and 16 have only one array?

13


Is there any overhead issues if you make a 2D array arr28 rather than making a 1D array arr16 of size 16 Any memory issues or execution differences between the two?

2D array of size 2x8 and 1D array of size 16


You have only one rectangular array and you are between the numbers 12 and 16 what number are you?

13...13x1.


What is squre array?

A square array is an array in which the number of rows is the same as the number of columns.


How check four number in c who is bigger?

In order to determine which of four number is bigger you need 16 if statements arranged in a nested if statement. That exceeds the complexity of just sorting it in an array. Here is a solution using a simple array sort. int array[] = {7, 2, 27, 4}; int i, swap; do { swap = 0; for (i = 0; i < 4; ++i) { if (array[i]<array[i+1]) { swap=array[i]; array[i]=array[i+1]; array[i+1]=swap; swap=1; } } } while (swap == 1); printf ("%d\n", array[0]);


What is The number of elements in an array is called?

the length of the array


This array field holds the number of elements that the array has?

length


Can a prime number be made into an array?

Yes, a unit array.


What is square array?

It is an array with the same number of rows and columns.


How many different ways can you make rectangular arrays for the number 64 and what are they?

3 or 7 - depending on whether you count a transposed array as different. 1*64 2*32 4*16 8*8


If you have 16 sticks how can you create 4 squares?

make a 4 by 4 array like this four sticks in 4 rolls get it