typedef statement, Structure and Unions, C Language Assignment Help

Assignment Help: >> Structure and Unions >> typedef statement, Structure and Unions, C Language

typedef statement 

It is used to redefine the name of an existing variable type.

typedef long int NUMBER

now we can declare variables of the type long int by writing-

NUMBER num1,num2;

typedef provide a short and meaningful way to call a data type. Usually, uppercase letters are used to make it clear that we are dealing with a renamed data type.

struct employee

{

                char name[20];

                int age;

};

typedef struct employee EMP;

EMP e1,e2;

typedef statement provides a short and meaningful way to call a data type. Its purpose is to redefine the name of an existing variable type. Typedef may be used with any data type. Its general format is as follows :

Syntax :

typedef  <existing datatype>  <new datatype>;

Example :

typedef  int  itech;

itech a,b,c;   /* declare a, b,c  as int variable */

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd