In the last lecture, we learned about the data types we can use to represent and use floating point numbers in C programs. In this lecture, we'll talk about representing and using characters. So a character is represented by the char data type. And you'll hear people pronounce this as char, and care, and car, and so on. There's lots of ways to pronounce C-H-A-R. You'll hear me say char, and that's to represent a single character. In C, a character is represented with 8 bits, a single byte, and they are used to represent what are called ASCII characters. And this is a character set that has been around for a very long time. You may have had of something called Unicode, that actually, in other programming languages, uses 16 bits instead, because there are lots of character sets in the world. But within our C programming, we're going to use ASCII characters with the char data type. The operations on characters are things that we should learn as we need them. I regularly use chars for comparison. We can do other things these chars, but usually I'm just doing comparison. If you find you needed another operation on chars, you just explore the documentation to figure out how to do whatever you need to do. Let's go take a look at an example of using a char variable in our C program. Here's the project that we'll use for this lecture, and as you can see I've already imported the template and provided a comment here above the main function. So let's go ahead and declare a char variable. We declare char variables just like we declare other variables, we just put the data type first, and then we put the name of the variable, and I'm going to call this menuChoice. So let's say we're actually writing a console app, where the user is typing things and is picking from a menu for what they want to do next. So that makes this a reasonable variable that we're going to use for this example. Remember, for variables, we can optionally assign them a value as well, when we declare them. And I'd like to do this here, so I'm going to say that menuChoice starts as z. And if I compile at this point, you can see down here in the error list, that we get an error that says z is an undeclared identifier. Because we declare variables using one or more characters for the variable name, so the compiler thinks that this is actually a variable. We want to assign it a character value, and the way we do that is we put an apostrophe, and the value, and another apostrophe or a single quote. So just as we had double quotes for string literals, we have single quotes for characters. And if I compile now, you'll see that we actually get a successful compilation. Let's actually take a look at how this is working using the debugger. So I'm going to set a break point. I just left clicked in this gray area next to line 14. And then I'm going to debug. I'm selecting Debug, Start Debugging. And as you can see, we've stopped at this line, because over here where the break point is specified, we have a yellow arrow inside the red circle. Notice that menu choice has a value of -52 at this point, because we haven't assigned it a value yet. So we're getting whatever happens to be sitting around in the memory that was allocated for menuChoice. So if I step over, debug, step over, which is F10, we can see that menuChoice now has a value of z. Now, you may have also noticed that menuChoice is listed with a value of 122 as well. And if we actually Google to look up an ASCII table, you can see here that z has the decimal value of 122. And that actually tells us that there's another way that we can assign a value to a character. So I can set menuChoice to an integer like 122 and we can use the debugger again. When it stops at this line of code, remember we just have garbage there. If we F10, menuChoice changed to z, and if we F10 again, you'll see that menuChoice stayed z. Let's do this one more time, changing the value from z to something else. So let's actually make it 120 here in the second line of code. We'll debug one more time. We'll step over once, and the value of menuChoice is z, and we step over one more time, and now the menuChoice char variable has a value of x, because x is two characters before z. And I'll stop debugging and I'll remove this break point as well. But this actually tells us that we can do some integer math with char variables, and we'll see that we do that later in this course. And that let's us actually traverse the letters, and shift by certain amounts, and so on because they are represented both as numbers and the actual characters. So what we saw in this code today was we saw how to declare a char variable. We saw how to assign a character literal to that char variable, and we also saw that we can also assign numbers. To that char variable, and it will assign the corresponding character in the ASCII table to the char variable. To recap, in this lecture we learned about the char data type in C, which let's us store ASCII characters.