{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Thewordmarksisthenameofarray

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: this purpose as : int marks[10]; This statement reserves ten locations in memory for storing elements Here int specifies the type of elements or items that will be stored in the array. The word marks is the name of array. [10] indicates the number of locations or the number of variables of type int in which data elements are to be stored which all should be integer type. It will look like in memory as 0 marks 1 2 3 4 5 6 7 8 9 The Bounds The Bounds The lower bound for an array in C language is ‘0’ and upper bound is size­1. So marks[10] means marks[0] through marks[9] i.e. 0 to 9 ten locations. Subscript numbers 0 1 2 3 4 5 6 7 8 9 marks The Subscript The integer values in brackets are known as subscripts which is used to distinguish one location from the other. The subscript actually specifies the position of element in an array, the last array element will have subscript one less than the size of the array. In this case, size of array is 10 and the last subscript is [9]. Storing/Inputting values in Arrays Storing/Inputting values in Arrays For e...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern