Programming Concepts Tutorial

Learn the fundamental concepts of computer programming

Data Types

Data Types

Variables can store data of different types. Knowing the data type is important because you cannot, for example, add a word to a number.

Common Data Types:

  • Integer: Whole numbers (e.g., 5, -10).
  • Float/Double: Numbers with decimals (e.g., 3.14, -0.99).
  • String: Text characters (e.g., "Hello").
  • Boolean: True or False values.
  • Array: A collection of values.

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics