C Programming Tutorial 20 – Intro to Data Types – Part 2

Don’t forget to read the last blog on data types! Are you new here? Start at the beginning, Intro to C!

There are other data types you will come across. One example is an array. An array can be used to store multiple values in one data type. So we could make an array of integers, which would be a collection of integers, where each are called elements of the array.

We can also create a character array. A character is just an individual letter, number or symbol from the keyboard.

Continue reading “C Programming Tutorial 20 – Intro to Data Types – Part 2”

C Programming Tutorial 19 -Intro to Data Types – Part 1

This blog is going to introduce the concept of data types. Don’t forget to read the last blog on Vim basics! Are you new here? Start at the beginning, Intro to C!

First, let’s define data. Data is any piece of information. Think of a variable. Let’s say we have a variable called tacos, and the value of this variable is 5. The 5 is a piece of data (datum). Now, each piece of data has an associated data type.

What is a Data Type?

A data type defines how the computer should treat a certain value.

As we learned before, integer division is completely different than double division.

5/2 = 2, but 5.0/2 = 2.5.

Continue reading “C Programming Tutorial 19 -Intro to Data Types – Part 1”