Skip to content
Question Bank (2 marks) · Q34

Q.Write the syntax of for-statement.

Karnataka PUCTextbookShort· 2mImportance★★★★★est
96% · 148/154 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 →

[!TLDR]

Syntax: for (init; test; update) { statements; }

The for statement is an entry-controlled loop used when the number of iterations is known. It has three parts separated by semicolons inside the parentheses:

  • expression1 initialises the loop control variable (done once at the start).
  • expression2 is the test condition, checked before each iteration.
  • expression3 updates (increments/decrements) the loop variable after each iteration.

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.