#include #include "01-typedef.h" int main( int argc, char *argv[] ) { //----------------------------------------- // using the int types //----------------------------------------- int i = 0; StudentNumber sn = 1234567; i = sn; // OK sn = i; // OK sn = 2.2; // OK //----------------------------------------- // using the struct types //----------------------------------------- struct student_t alice; Student bob; Student2 charlie; // are these legal? alice = bob; // struct student_t = Student OK bob = charlie; // Student = Student2 OK //----------------------------------------- // trying to use structurally equivalent // struct types //----------------------------------------- // here frank is a variable of an anonymous struct type // that is idential to struct student_t struct { char *name; StudentNumber id; } frank; // creates a variable frank of an anonymous struct type frank = alice; // struct {} = struct student_t NOT OK frank = frank; // avoid "frank set but not used" compiler warning return EXIT_SUCCESS; }