Co to jest typedef
It is used to choose an alternative name of existing datatype mostly
used with user-defined data types
Ahmad Mujtaba
It is used to choose an alternative name of existing datatype mostly
used with user-defined data types
/* Its a variable for the datatype
Example: We define “number” as a synonym for int.
*/
typedef int number
number x = 7;
number square( number y ) {
return y * y ;
}
/* Now if we decide that we want a float we only have to change it in one place */