Defining Your Own Type Names

Let's make our own data type using the typedef keyword.

The typedef keyword

In C, we can assign an alternate name to a data type, any name we want. A typedef statement allows us to do this.

For example, we can use the typedef keyword to define a type called Counter which is an alternate name for an integer, like this:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy