What are arrays, C/C++ Programming

Assignment Help:

What are Arrays?

Numerous applications require the processing of multiple data items that have identical characteristics. In such circumstances it is frequently convenient to place data items into an array where they will all share the same name (example; arr). The individual data items can be floating-point numbers, characters, integers, and so on. But, they must all be of the same storage class and the same type.

Every array element (that is each individual data item) is referred to by specifying the array name followed by one or more subscripts with each subscript together with this in square brackets. Every subscript must be expressed as a nonnegative integer. In an n-element array and the array elements are arr[0], arr[1], arr[2],....................arr[n-1] as illustrated in figure. The value of every subscript can be expressed as an integer variable, an integer constant or a more complex integer expression.

The number of subscripts concludes the dimensionality of the array. For instance x[i] refers to an element in the one-dimensional array x. likewise y[i][j] refers to an element in the two -dimensional array y. Higher-dimensional arrays can be as well be formed, by adding additional subscripts in the same manner (that is z[i][j][k])


Related Discussions:- What are arrays

Polishing game, Byteland county is very famous for luminous jewels. Luminou...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Wap to print series from 1 to 10 & find its square and cube, # include stdi...

# include stdio.h> # include conio.h> # include math.h>   void main () { int a=1,sqr=0,cube=0; clrscr (); while (a { sqr=pow(a,2); cube=pow(a,3);

Pebble merchant, There is a pebble merchant. He sells the pebbles, that are...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

Area under the curve, Write a c++ program to find the area under the curve ...

Write a c++ program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points c

Describe spaghetti programming, Describe spaghetti programming. - Spagh...

Describe spaghetti programming. - Spaghetti programming refers to codes which tend to get tangled and overlapped throughout the program. - It makes a program complex and ana

Class & objects, how objects are initialized dynamically?

how objects are initialized dynamically?

Explain syntax rules for writing a destructor function, Syntax rules for wr...

Syntax rules for writing a destructor function Its name is the similar as that of the class to which it belongs, except that the first character of the name is the symbol t

Reading from a Hash table in C, I''m having trouble with my C code to red f...

I''m having trouble with my C code to red from a Hash table. Not sure what it is I''m doing wrong and stumped. I need to get it figured out by tomorrow at 4:00 p.m. Eastern time. C

Write a program to calculate the average of ten numbers, Write a program to...

Write a program to calculate the average of ten numbers       #include stdio.h     /* Only this header is needed since only IO are used */     void main()     {          char

#title prime number or not, to find prime numbers upto any number say "n" e...

to find prime numbers upto any number say "n" entered by user

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd