Calling task inside function

In reply to prachi01:

Please use code tags.

Your code does not call function b anywhere.