Question: ofcourse how do you spell?
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.