AS · Practice questions · Features of an IDE

Write, check, debug.

Six original Cambridge-style questions on the features of a typical IDE, with mark-scheme solutions.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

Four groups of features.

01
Recall
[4 marks]

Identify four features of a typical IDE that help a programmer to debug a program.

  • Single stepping. ✓
  • Breakpoints. ✓
  • Watching variables / expressions (watch window). ✓
  • Report window. (Also accept dynamic syntax checking for initial error detection.) ✓
02
Explain
[2 marks]

Describe how a dynamic syntax check helps a programmer.

  • Each line is checked for syntax errors as it is typed. ✓
  • Errors are highlighted immediately, so they can be corrected before the program is translated / run. ✓
03
Explain
[4 marks]

Describe two IDE features that improve the presentation of code, and explain how each helps.

  • Prettyprint: colour codes keywords, identifiers and strings and indents the code consistently. ✓
  • This makes the structure easier to read and errors such as a missing ENDIF easier to spot. ✓
  • Expand and collapse code blocks: whole procedures, loops or selection statements can be hidden or shown. ✓
  • This lets the programmer focus on one part and see the overall structure of a long program. ✓
04
Explain
[2 marks]

Explain how context-sensitive prompts help a programmer to write code.

  • The editor suggests keywords, declared identifiers or a routine's parameters based on what is being typed. ✓
  • This speeds up coding and reduces errors such as misspelt identifiers or wrong parameters. ✓
05
Apply
[4 marks]

A program should output the largest of 10 numbers stored in an array but outputs a number that is not the largest. Describe how a programmer could use IDE debugging features to find the error.

  • Set a breakpoint at the start of the loop / at the line that updates the largest value. ✓
  • Use single stepping to execute the loop one statement at a time. ✓
  • Watch the variables (index, current element, largest so far) in the watch window. ✓
  • Find the statement where the largest value is not updated as expected, i.e. the logic error, and correct it. ✓
06
Analysis
[2 marks]

A programmer says: "My IDE shows no syntax errors, so my program must be correct." Explain why this is not necessarily true.

  • Dynamic syntax checks only find syntax errors (code that breaks the rules of the language). ✓
  • The program may still contain logic errors (or run-time errors), giving wrong results, which need testing and the debugging tools to find. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.