hi
i want to know about how typedef is usued?i found that it is for user defined data type.
ex:
typedef struct
{
int ac_no;
char ac_type;
char name[80];
flaot balance;
} record;
record oldcustomer,newcustomer;
...but same thing we can write as below..
struct record
{ int ac_no;
char name[80];
floa balance;
};
struct record oldcustomer,newcustomer;
-----this has the same effect as earlier. i think latter one is more readable. but still i found in book that "....typedef feature is convenient when defining structure because it eleminates repetation of structure tag" ( schaum's series c programming) how????????
i think latter one is good. is there any advantage of using typedef over structure??
or can u say in any other place where this typedef is usefull?
thanks