0

I read that:

The C programming language provides a keyword called typedef, which you can use to give a type, a new name. Following is an example to define a term BYTE for one-byte numbers: typedef unsigned char BYTE;

This can be done using #define too. Like:

#define BYTE unsigned char

So my question is... Why use typedef when I can use #define?

I mean #define can be used for things which are not types too. So what advantage do I get for using typedef?

Debanik Dawn
  • 797
  • 5
  • 28

0 Answers0