Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

WGU Scripting and Programming Foundations Exam - Topic 2 Question 13 Discussion

Which kind of languages are C and Java?
B) Compiled
A) Machine code
C) Interpreted
D) Markup

WGU Scripting and Programming Foundations Exam - Topic 2 Question 13 Discussion

Actual exam question for WGU's WGU Scripting and Programming Foundations exam
Question #: 13
Topic #: 2
[All WGU Scripting and Programming Foundations Questions]

Which kind of languages are C and Java?

Show Suggested Answer Hide Answer
Suggested Answer: B

Comprehensive and Detailed Explanation From Exact Extract:

C and Java are both compiled languages, though they differ in their compilation process. According to foundational programming principles, C is compiled directly to machine code, while Java is compiled to bytecode, which is executed by the Java Virtual Machine (JVM).

Option A: 'Machine code.' This is incorrect. Machine code is the low-level output of a compiler, not a programming language. C and Java are high-level languages.

Option B: 'Compiled.' This is correct. C is compiled to machine code (e.g., .exe files), and Java is compiled to bytecode (.class files), which is then executed by the JVM. Both require a compilation step before execution.

Option C: 'Interpreted.' This is incorrect. Neither C nor Java is interpreted. While Java's bytecode is executed by the JVM, the compilation to bytecode distinguishes it from interpreted languages like Python, which execute source code directly.

Option D: 'Markup.' This is incorrect. Markup languages (e.g., HTML) are used for structuring content, not programming. C and Java are programming languages.

Certiport Scripting and Programming Foundations Study Guide (Section on Compiled Languages).

Java Documentation: ''The Java Compiler'' (https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html).

W3Schools: ''C Introduction'' (https://www.w3schools.com/c/c_intro.php).


Contribute your Thoughts:

0/2000 characters
I remember that markup languages are different from programming languages, so I don't think that's the answer. But I’m not confident about the compiled vs interpreted part.
upvoted 0 times
...
Daniela
5 days ago
I feel like C is definitely compiled, but Java might be a bit tricky since it runs on the JVM. Is that considered interpreted?
upvoted 0 times
...
Fernanda
10 days ago
I practiced a similar question last week, and I think both C and Java are compiled. But I could be mixing them up with other languages.
upvoted 0 times
...
Antione
15 days ago
I think C is a compiled language, but I'm not sure about Java. I remember something about it being both compiled and interpreted?
upvoted 0 times
...

Save Cancel