RBSE SS Computer Science study materials
RBSE SS Computer Science study resources

RBSE SS Computer Science: Programming Fundamentals and Problem Solving

RBSE SS Computer Science · Work through your exam, one topic at a time.

All guide sections

Programming Fundamentals and Problem Solving

Programming Fundamentals and Problem Solving asks you to turn a problem statement into a precise, finite sequence of steps and to reason about how that sequence behaves before any code is typed. Expect questions on algorithm properties, flowchart symbols, pseudocode, the three control structures, language translators and error types.

Core rules

  • A valid algorithm is finite, definite, has zero or more inputs, one or more outputs, and is effective - every step must be doable.
  • Flowchart symbols: oval = start/stop, parallelogram = input/output, rectangle = process, diamond = decision, arrow = flow of control.
  • Sequence, selection and iteration are the only control structures needed; structured programs avoid unconditional jumps.
  • A compiler translates the whole program and reports errors together; an interpreter translates and runs line by line.
  • Syntax errors break grammar rules and are caught by the translator; logical errors run but give wrong output; runtime errors stop execution (division by zero, invalid index).
  • Dry running means tracing variable values by hand, line by line, usually in a table.

Worked example

Algorithm to find the largest of three numbers a, b, c:

  1. Read a, b, c.
  2. If a ≥ b and a ≥ c, set max = a.
  3. Else if b ≥ c, set max = b.
  4. Else set max = c.
  5. Print max. Dry run with a = 7, b = 12, c = 9: step 2 fails because 7 < 12; step 3 succeeds because 12 ≥ 9, so max = 12. Correct.

Traps

  • Using = for comparison in pseudocode; comparisons need == or the words equals/greater than.
  • Drawing a decision diamond with only one exit arrow.
  • Labelling a wrong-output program a syntax error.
  • Writing a loop whose condition never changes, which makes the algorithm non-finite.