Lec28 - Computer Programming I TA C162 So far we did Data...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Computer Programming I TA C162 . 17 Mar 2007 So far we did…. Data types, Variables, constants Operators and Expressions Programming Constructs Sequential  Conditional If else, switch   Iterative do while, while, for Program verification Loop invariance
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Computer Programming I TA C162 . 17 Mar 2007 What Next… Derived Data types Arrays Declarations and Initialization One dimensional Arrays  Two dimensional Arrays Multi dimensional Arrays Character Arrays
Background image of page 2
3 Computer Programming I TA C162 . 17 Mar 2007 Arrays An array is  fixed size   sequenced  collection of elements of the  same   data type  addressable by index or subscript. It is a convenient structure for representing large number of  homogenous  values It can be used to represent a list of numbers or a list of  names. Examples: Linear arrays List of marks of students List of grades of students List of employees in an organization List of names of students
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Computer Programming I TA C162 . 17 Mar 2007 One Dimensional Arrays List of items given one variable name using only one  subscript  Declaration: type variable_name[size]; Here size indicates the maximum number of elements The subscript value start from  0  to  size-1 Example: int number[10]; float number[10]; char grade[10];
Background image of page 4
5 Computer Programming I TA C162 .
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

Page1 / 17

Lec28 - Computer Programming I TA C162 So far we did Data...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online