Definition: when you define something it takes up actual memory in your program. When you do int x;
you already take up memory for your variable even it is unitialized.
Initialization: initializing something can only be done while defining it simultaniously. The variable will already have a valid value assigned to it after creating it. E.g. int x = 3;
x
is now initialized and defined.
Declaration: If you declare something it does not really take up memory in your application like for example function prototypes. If your declare a function like this void foo();
it is just an introduction for the compiler and unless you define it, will not take up memory in your application.
Assignement: you assign a variable whenever you set its value after you defined it. So if you do
int x;
x = 2;
You assigned x
the value 2