Skip to content

Explain like I’m five: char and strings

Think about building blocks. Each block is like a letter or a symbol (like ‘a’, ‘b’, ‘!’, ‘?’ and so on). In computer language, we call these blocks char – short for character.

Now, let’s say you stack several blocks together to form a word or a sentence, like “hello”, “cat”, or “I am happy!”. In computer language, we call this a string. So, a string is really just a bunch of char blocks stuck together to make words, sentences, or even whole stories!

So, when you’re typing on a computer, every key you press is like a char block, and when you’ve typed out a whole word or sentence, you’ve made a string.