typedef in C || Lesson 76 || C Programming || Learning Monkey ||

Опубликовано: 24 Июль 2021
на канале: Learning Monkey
8,384
185

typedef in C

In this class, we will try to understand typedef in C.

We have seen how to declare a structure tag in our previous class.
typedef in C

The image is the use of a structure tag and the declaration of variables for those structures.


In the above declaration, we use the keyword struct for all the variable declarations.

In C, we have a provision to define the data types, which the typedef can do.

The typedef is used to create an additional name for the existing data type but does not create a new type.

For example, we want to create a new definition for int data type as an integer.

The image below shows how to create the type definitions.


We can now use Integer for our variable declaration instead of int, as shown below.
typedef in C Example on int datatype


The use of typedef is frequently used for structures.

The declaration of the student structure with typedef is as shown below.


Now in the variable declaration, we can avoid the use of struct student as shown below.





#learningmonkey #cprogrammingforbeginners #placements #gatecse #cprogramming #cprogramminglanguage






Link for playlists:
   / @learningmonkey  


Link for our website: https://learningmonkey.in

Follow us on Facebook @   / learningmonkey  

Follow us on Instagram @   / learningmonkey1  

Follow us on Twitter @   / _learningmonkey  

Mail us @ [email protected]


Смотрите видео typedef in C || Lesson 76 || C Programming || Learning Monkey || онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Learning Monkey 24 Июль 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 8,38 раз и оно понравилось 18 людям.