teach-ict.com logo

THE education site for computer science and ICT

1. Introduction to data types

Programs work with many different types of data. Some of it might be strings of alphabetical characters, others might be numbers, others might be values of true or false.

You want your programs to be able to tell these data types apart - trying to perform mathematical operations on a piece of text or convert a list of numbers to upper case does not make any sense.

In this section, we will discuss how programs classify data into different types, and what each of those types are used for. The basic data types in computer programming are:-

  • Character
  • String
  • Boolean
  • Integer
  • Real

 

image