Coupon Accepted Successfully!


User Defined Data Types

  • C++ allows defining explicitly new data type names by using the keyword typedef.
  • It actually creates a new data class, rather it defines a new name for an existing type
  • The general format of typedef is

typedef type name;

  • For example
    • typedef int amount;
      • then to access we can write as
      • amount basicsalary, netsalary;
  • From the above example it is assigned that the variable amount is declared as integer type and the further values are also of same type.

Test Your Skills Now!
Take a Quiz now
Reviewer Name