The Basics Of Computer Programming 101 – Variables And DataTypes

Having introduced and talked a little about Object Oriented Programming before and where its namesake comes from, I thought it’s time we go through the absolute basics of computer programming in a non-language specific way. This is the kind of stuff computer science majors learn in the first term, and I’m aiming this at people with absolutely zero experience in programming.computer science computer science computer science computer science computer science

Today, I’ll be covering the most fundamental part of any programming language – variables and datatypes. We’ll have a few more lessons after this on the fundamentals before we delve into any actual code, so no worries about things getting complicated yet.

Variable and Datatypes:

At the core of any program are variables. Variables are where the dynamic information is stored. When you type your name into a web form and send it, your name is a variable.computer science computer science computer science computer science computer science

Not all variables are the same though. In fact, there are many different types of variables that nearly every programming language has. Let’ s look at a small selection of them, as well as their short names if they have one:

Character (char): This is a single character, like X, £, 4, or *. You don’t often create single character variables, but they are at the core of the language so you need to know what they are.

String: This is a “string” of characters (see how they’re at the core?) of any length. In my previous example – your name on web form – your name would be stored as a String variable.

Prev1 of 4Next

Leave a Reply

Your email address will not be published. Required fields are marked *