This tutorial explains typedef in c programming.
Typedef in C
Although typedef is thought of as being a storage class, it isn’t really. It allows you to introduce synonyms for types that could have been declared some other way.
The new name becomes equivalent to the type that you wanted, as this example shows.
typedef int aaa, bbb, ccc; typedef int ar[15], arr[9][6]; typedef char c, *cp, carr[100]; /* now declare some objects */ /* all ints */ aaa int1; bbb int2; ccc int3; ar yyy; /* array of 15 ints */ arr xxx; /* 9*6 array of int */ c ch; /* a char */ cp pnt; /* pointer to char */ carr chry; /* array of 100 char */
If you have any doubt feel free to comment below 🙂
You can also read the below tutorials.
Embedded Software | Firmware | Linux Devic Deriver | RTOS
Hi, I’m SLR. I am a tech blogger and an Embedded Engineer. I am always eager to learn and explore tech-related concepts. And also, I wanted to share my knowledge with everyone in a more straightforward way with easy practical examples. I strongly believe that learning by doing is more powerful than just learning by reading. I love to do experiments. If you want to help or support me on my journey, consider sharing my articles, or Buy me a Coffee! Thank you for reading my blog! Happy learning!