There are many ways to say "of course" in Spanish, just as there are in English. "Of course" is an idiomatic expression, which means it cannot be translated literally ('de curso' doesn't really mean anything in Spanish).
English (some are context-dependent):
- Of course
- Absolutely
- D'uh
- Yes
- Yeah
- Clearly
- Without a doubt
- Undoubtedly
- It goes without saying
- Sure / Surely
- Naturally
- etc...
Spanish (again, some are context-dependent):
- Claro que sí
- Claro
- Sí
- Definitivamente
- Por supuesto
- Desde luego
- Claro está
- Sin duda
- Naturalmente
- Seguro
- etc...