Skip to content
Question 69 of 97

Q.State True or False. "Comments are not executed by interpreter."

Yanam BieapCBSE Class XII Board 2023Subjective· 1mImportance★★★★★
71% · 69/97 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Comments are ignored during execution — they exist only for human readers. True.

Why comments exist in the first place

When you write code, you're communicating with two audiences: the machine (which executes instructions) and other humans (including your future self) who need to understand why you made certain choices. Comments are annotations written in plain language that the interpreter or compiler deliberately skips over. They have zero effect on program behavior.

Think of comments as margin notes in a textbook — helpful for the reader, but the printing press doesn't "execute" them when producing the book.

How interpreters handle comments

Every programming language defines a syntax for comments (e.g., # in Python, // in C++, /* ... */ in Java). During the parsing phase, the interpreter or compiler recognizes these markers and strips out everything marked as a comment before generating executable instructions.

  1. Lexical analysis: The interpreter scans the source code character by character. When it encounters a comment delimiter, it skips all subsequent characters until the comment ends (end of line for single-line comments, closing delimiter for multi-line).

  2. No bytecode generation: Comments never make it into the intermediate representation (bytecode in Python, for instance) or machine code. They're discarded before execution begins.

  3. Runtime: By the time your program runs, comments have vanished entirely from the interpreter's view. Only executable statements remain. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.