What is the exact difference between static tasks/functions and automatic tasks/functions ? please explain with a clear example

In reply to GoAyushi:

Hope this makes things clearer

Since the add is a static task by default, the local variables are allotted only one memory location for all calls to that task.

@t=0 → a=3 , b=2
@t=1 → a=3 , b=4; (second call overwrites the first call values, as no separate memory is allocated for local variables in different calls to the task); The first call hasn’t reached the display statement because of #2 delay.
@t=2 → The first call display statement is executed and the sum is a(3)+b(4)=7
@t=3 → The second call’s display statement is executed and the sum is again a(3)+b(4)=7.