Correct spelling

of course

Correct spelling, explanation: this phrase comes from an older one of the ordinary course, which was later shortened. Because of course is a phrase, not a word, it is written separately. Thus ofcourse is a misspelling. An adverbial phrase is written separately, so of course, is the correct form.

Definition of of course:
the adverbial phrase, naturally, in an expected order
Of course, we wanted the best hotel room, but all the best ones were booked.
-Could I borrow your pen, please? –Of course, no problem!


Incorrect spelling

ofcourse

Incorrect spelling, explanation: this is a misspelling, because of course is an adverbial phrase and should be written separately. It comes from a phrase known from the 16th century of the ordinary course, something in an ordinary order. Ofcourse is incorrect, because phrases are written as separate words, so of course is the correct form.