Hi,there.
When you answer the question-----:你知道吗? ,you can say"Of course, I know".But you should say "我当然知道"instead of "当然,我知道"。You know,this is the problems of language order.
You can also say"是的".
There is a little different between these sentence.When you say"我当然知道",it means you answer the question with confidence and you believe in yourself .
"是的"just likes "yes".
I will show you some example as follow:
你爱他吗?是的/当然。(Do you love him? Yes/Of course)
我可以把真相告诉他吗?是的/当然可以。(Can I tell him the truth? Yes/Of course ,you can)
你可以教我跳 dougie吗?当然。(Would you teach me how to dougie? Of course.)
When someone ask you for help,I recommond you to use "当然可以"。
For example,,Li qin,可以帮个忙吗?当然可以。(Can you give me a hand? Of course.)
At this situation,people will know that you are willing to help him/her.
That's all .Hope it can help you.Enjoy learning Chinese.