In this Lesson on variables in C we learned:

  1. The rules for naming variables in C.
  2. The main data types in C: int, float, double, and char.
  3. Declaration and initialization of data types in C, as well as how to change their value.
  4. How to cast from one data type to another and some potential limitations in C.

We went over a general introduction to variables, but there is much more to learn. You should now have the building blocks we will add on to. In the next lesson, we will go over more options you have with variables, such as arithmetic, comparisons, and logical operators that will allow you to expand on the power of variables in C. Thank you for joining us and we can’t wait to dive into the next lesson with you.


Feel free to practice everything you have learned in this lesson to make sure you have the fundamentals down before moving on.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?