Defining Your Own Type Names Using typedef

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

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

For example, we can use typedef 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