Defining Your Own Type Names

Make your own data type using the typedef keyword.

We'll cover the following

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.

Continue your learning journey with a 14-day free trial.

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