What would you like to do?

What is the difference between a string and an array?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

Nothing whatsoever. A string is simply an array of type char.
In some programming languages, such as C, a string is an array of char (or short), terminated with a null \0.
An array is just a fixed size of collection, a container to hold things/objects. If all the elements in the container are characters (of char), then we may call it a string, sometimes a byte array (because each character can be represented as a byte).

An array of 7 different days, it maybe a WEEK, or just the birthdays of 7 dwarfs. Then they are nothing to do with strings.

A data item (or variable) is described as a "string" type when it contains some number of characters. Those characters can usually be anything in the system's accepted list of codes. Most systems use ASCII, so a string can include the letters a-z, A-Z, numbers 0-9, and special characters like ~!@#$%^&*()_+-=[]\{}|:";'<>?,/. A string is treated as a single object, although most programming languages have methods to break strings apart (called sub-stringing). In the Perl language, strings are named $something.
An array is a collection of individual data items, sort of like a list. Each element in an array can be referred to in a program by its position in the list. In the Perl language, an array would be named @SOMETHING. The first element in the array would be named $SOMETHING[0], the second $SOMETHING[1], and so on. Each element can be a string, or some other data type.
Other data types would be integers (positive or negative whole numbers), floating point (decimal numbers like 3.14159 or 2398.41; it can be more complicated than this, but that's another story), and a few more exotic types.
In the C programming language a string is actually the same as an array of characters. The last character in a C string is a zero byte which indicates the end of the string.
56 people found this useful
Thanks for the feedback!

What is the difference between vector and array?

The abstraction are the same. However, the array may be of any objects, while a vector, in narrowed definition, each element is a scalar value (e.g, int, float, double, etc),

What is the difference between Strings and Arrays in c?

There is no difference. A string is just an array of type char. The  only real difference is that we do not need to keep track of the  length of a string because strings are

What is difference between strings and arrays?

A String in C is an array of characters. An array is just a sequence of similarly-typed elements that are stored in consecutive memory locations and can be accessed by using t

What is the difference between array and array list?

In VB.net, an Array has a defined count, whereas an ArrayList can be populated dynamically. You can perform advanced calculations on an Array, making it more powerful, but it

What is the difference between array and control array?

An array is a set of values that are logically related to each other, such as the number of students in each grade in a grammar school. An array allows you to refer to these r

What is the difference between array and record?

The main difference b/w array & record is that the array is acollection of similar type like integer ,real ,real etc, whichshare a common name like 10 elements of type integer

What is difference between pointers and arrays?

A pointer is a variable that may contain a memory address, or NULL (zero). An array is collection of data, usually residing in a contiguous block of memory, where every eleme

What is the difference between array and hash?

The main difference is usage...a hash is an array, of sorts. Speaking of sorts, the comparison between a hash and an array takes on meaning when you compare a "sorted array" a

Difference between a structure and an array?

Structures and arrays are somewhat similar in that they both "contain" multiple items of data in one package. Arrays contain several copies of the same type of data one afte