Lect1 - Data Structures: Introduction CSC212 1 Data Types...

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

View Full Document Right Arrow Icon
1 Data Structures: Introduction CSC212
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Applications/programs read data, store data temporarily, process it and finally output results. What is data? Numbers, Characters, etc. Application/ Program Data Data
Background image of page 2
3 Data is classified into data types . e.g. char, float, int, etc. A data type is (i) a domain of allowed values and (ii) a set of operations on these values. Compiler signals an error if wrong operation is performed on data of a certain type. For example, char x,y,z; z = x*y is not allowed.
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Examples Data Type Domain Operations boolean 0,1 and, or, =, etc. char ASCII =, <>, <, etc. integer -maxint to +maxint +, _, =, ==, <>, <, etc.
Background image of page 4
5 int i,j; i, j can take only integer values and only integer operations can be carried out on i, j. Built-in types: defined within the language e.g. int,float , etc. User-defined types: defined and implemented by the user e.g. using typedef or class .
Background image of page 5

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

View Full DocumentRight Arrow Icon
Simple Data types: also known as atomic data types have no component parts. E.g. int, char, float, etc.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/18/2010 for the course COMPUTER S CSC212 taught by Professor Shah during the Winter '09 term at King Saud University.

Page1 / 22

Lect1 - Data Structures: Introduction CSC212 1 Data Types...

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

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