#include /* ------------------------------------------------------------- Structure definition Note: You MUST define the structure BEFORE you can define/declare any variable of this structure !!! ------------------------------------------------------------- */ struct BankAccount { int accNum; double balance; }; typedef struct BankAccount BankAccount_t; int main(int argc, char *argv[]) { BankAccount_t b; // New way to define struct BankAccount struct BankAccount a; // Old way still works a.accNum = 123; a.balance = 4000; printf("a.accNum = %d a.balance = %f\n", a.accNum, a.balance); /* =============================================== Proof that they are the same type of variable ================================================ */ b = a; printf("b.accNum = %d b.balance = %f\n", b.accNum, b.balance); }