Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 What is a comment for? a A way to fix all logic errors b. A directive

ID: 3717811 • Letter: Q

Question

QUESTION 1 What is a comment for? a A way to fix all logic errors b. A directive to the compiler to change program behavior . A hint to the compiler so your code will compile d. Text added to code that is intended for humans to read QUESTION 2 What is the difference between syntax error and a logic error? a. Logic errors only happen on the Windows Operating System b. ?? A syntax error happens at compile time while a logic error happens at runtime C. A logic error happens when logic circuity of the CPU fails d.

Explanation / Answer

Question 1

The answer is d. Text added to the code that is intended for humans to read

Generally the comments are in human readable language for example English language, these comments are used to understand the humans/users/some other programmers that, what the total program or some block of code or a single statement in program will do.

Question 2

The answer is b. A syntax error happens at compile time while a logic error happens at runtime

while the program is compiling the compiler will take care of the syntax errors, a syntax error may be type error or declaration error or missing semicolon etc. these errors are raised by syntax analyzer or type checker or by the parsers at compile time whereas the logical errors are raised at the time of running the program, logical errors are also called as logical exceptions like array index out of bounds, divisible by zero etc.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote