Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Basics (Retired) Console I/O Recap

Matthew Stevenson
Matthew Stevenson
4,877 Points

Why do we say C# is a compiled language?

In the quiz, I was aksed if the statement "C# is a compiled language" is true or false. The answer is True, but why? Would this not only be true once we have run a compiler on our "un-compiled" C# language? Wouldn't the "C# language" be the human readable un-compiled code, and the compiled machine code generated by the compiler be called something else?

2 Answers

Todd Anderson
Todd Anderson
4,260 Points

Hi!

Like Java, it's a called a compiled language because it's a low-level language. The variables' types and other aspects aren't known until the program has been compiled. Other "interpreted" languages, like Python, are high-level which means you don't have to declare the variable type( int b = 2; ) you can just assign whatever you like and the language interprets what types they are (b = 2 (int)) when the program is run. I hope this helps!

P.S. Google will have better answers for you.

Matthew Stevenson
Matthew Stevenson
4,877 Points

Thanks Todd. It helps to understand that programming languages are either "compiled" or "interpreted". I was thinking along the lines of "compiled" literally meaning the code resulting from the compiling process. I see now that "compiled language" refers to a language that is/will-be compiled by a compiler to run, as opposed to a language that is/will-be interpreted by an interpreter to run.

Had a Google as suggested, and can see the full answer is more complex! I'm happy with the basic understanding and will avoid distracting myself further for now. I'm sure it will make more sense if I look at an interpreted language in future.

Todd Anderson
Todd Anderson
4,260 Points

Aww cool! Glad to help. :)