Difference Between String and Array

Posted on February 22, 2022 by Cheapest Assignment

Order Now
International Social Work

Q4 Difference Between String and Array

Ans   String-

 It is a type of datatype available in a varied programming language. It is quite comparable with ARRAYS and has few differences.

 It provides a variable number of elements and a sequence of characters.  It is used to present text format; it does not work on numbers. It denotes a sequence of characters with a single data type. 

Introduction to Law Coursework

It works differently in different programming languages. In C++ language, string works as a variable that is used to capture a “sequence of letters and other characters”.

In JAVA, string basically works as an object of no primitive type. 


 In computer language, an array is a collection of different data in a single line.it consists of elements and each of the elements is recognized by an array index or key. It is a structure of data that can be easily sorted or searched.

It has a few types named as –

A proposal investigating advantages and disadvantages of using the social network in business

  1. 1-D Array
  2. 2-D Array
  3. Multi-dimensional Array

1-D array works as similar to list, 2-D array works as like table and the multi-dimensional array can represent any matrix format.

It only works on linear-structured data i.e. it only works with a single line algorithm. Its index starts from 0 and ends at n-1 point.

Order Now