2022 Paper 1 Revision Quiz

From TRCCompSci - AQA Computer Science
Revision as of 10:17, 2 June 2022 by Admin (talk | contribs)
Jump to: navigation, search

1. In Recursion, the part of the code which runs itself is called?

General Case.
Correct
Base Case.
Incorrect
Repeating Case.
Incorrect
Recursive Case.
Incorrect

2. In Recursion, the condition which stops the recursive calls is called?

General Case.
Correct
Base Case.
Incorrect
Repeating Case.
Incorrect
Recursive Case.
Incorrect

3. Look at this sample code: <syntaxhighlight lang=c#> public int Fact(int num) {

  if (num == 0)
      return 1;
  else
      return num * Fact(num-1);

Your score is 0 / 0