In this video we are going to be discussing Boolean data. Boolean data is anything that is either true or false. Now, if you remember back a few videos ago when I started talking to you about binary, I mentioned how a single bit can be either 1 or
In the previous video we learned how to use the _Bool data type. I recommend you watch that video before you watch this one as it has fundamental knowledge that will help you here. If you’ve noticed, it seems that all the data types in C are lower case.
This video is going to discuss variables. Now, I know, we’ve said a lot about variables, so this video is going to be pretty short. The first thing I want to make sure you guys are clear on is the difference between defining a variable and initializing a
In this video we are going to be discussing operators. Now, the simplest examples of operators are the arithmetic operators. Think of something like this: 5 + 5 The + sign is called an operator, and each of the two integers are called operands. The entire thing is
This video is going to discuss the arithmetic operators. Now, we’ve discussed these some already and I’m sure you are familiar with them from math classes you’ve taken so this video is really not going to be that hard or confusing. The arithmetic operators include the +, -, /,
This video is going to introduce you to a new operator called the modulus operator (%). In the last video I gave you this example: int y = 5 / 2; I told you that the value of y is going to be 1. Did you figure
This video is going to be talking about the minus and plus operator. But wait, don’t leave yet. We’re not talking about the binary minus and plus operators, rather the unary ones. As a reminder, the difference is how many operands they work on. The binary minus operator, for example,
Let’s say we have a variable and we want to add one to it. int pizzasToEat = 123; The hard way to do this is to go like this: pizzasToEat = pizzasToEat + 1; What the assignment operator does here is take the entire expression on
In the previous video I showed you how you can add one to a variable. You can use the ++ operator. I also showed you what to do if you wanted to add more than one to a variable. For example, we can have something like this: int pizzasToEat
You may have heard from math class of this fancy thing called order of operations. We discussed this in a previous video so I’m not going to waste your time by repeating myself, but I am going to look at the same concept from a bigger point of view.