answersLogoWhite

0


Best Answer

That depends on the language you use, but I guess you're using C. So, here goes:

int x[10] = {0}; //declare an array with ten indexes (0 thru to 9)

printf("%i\n", x[0]); //print x[0], which should be zero.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you obtain a single value from array?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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.


How do arrays differ from single memory position variables?

A single memory position variable can store only one value of its type. An array can store n number of values, where n is the size of the array.


Algorithm to implement Multiple queue in single dimensional array?

algorithm on multiple queues in a single dimensional array


How do you initialize an array variable in java program?

An array in java is a collection of items stored into a single unit. The array has some number of slots (elements), each slot in the array can hold an object or a primitive value. Arrays in java are objects that can be treated just like other objects in the languageArrays can contain any type of element value , but we can't store different types in a single array. We can have an array of integers or an array of strings or an array of arrays.To create an array in java ,use three steps1. Declare a variable to hold the array2. Create a new array object and assign it to the array variable3. Store things in that array


Array is value type or reference type in CSharp?

Array is a class name, hence ought to be a value type.


How do you print an array in php?

There are a few methods however the following is the method that will allow you to do the most with the information afterwards. foreach($array as $key => $value){ echo '[' . $key . '] ' . $value; #$key becomes the array key and value because what the current array item has inside. }


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.


Can an array be a single column of values?

Yes.


How can you find the length of a single dimensional array in BlueJ?

array.length will return the number of elements in array.


How array differ from ordinary variable?

ordanry variable store one value at a time. arrays are used for storing more than one value at a time in a single variable name ordanry variable doesnt have subscript. array must have subscript syntax for ord. variable Datatype v1,v2...... syntax for array variable Datatype v1[n1],v2[n2].....


Passing an array name to a pointer assigns the first memory location of the array to the pointer variable?

Yes, passing an array name to a pointer assigns the first memory location of the array to the pointer variable. An array name is the same as a pointer to the first location of the array, with the exception that an array name is a r-value, while a pointer is an l-value.


How do you count the vowels in a string using PHP?

build an array of vowels then do a foreach on the array and then explode the string on the array value and the answer is -1 of the result