Question: how to write of course?
Answer: "Of course" is always 2 words, and is a shorter form of "As a matter of course". Furthermore, Google Fight says of course wins at 75 900 000 vs ofcourse which has only 521 000. If you Google it, half of the results on the first page are in the url, and the first result is another forum where this was asked.