Quiz Space

Computational Thinking · Qualifier · 10 Jul 2022 · May 2022 term

Question 3: The following pseudocode is executed using the "Library" …

Question 3

+2 marksOne correct option

The following pseudocode is executed using the "Library" dataset. What will count represent at the end of the execution?

text
1 A = 0, count = 0
2 while(Table 1 has more rows){
3 Read the first row X in Table 1
4 if(X.Year > A){
5 A = X.Year
6 }
7 Move X to Table 2
8 }
9 while(Table 2 has more rows){
10 Read the first row Y in Table 2
11 if(Y.Year != A){
12 count = count + 1
13 }
14 Move Y to Table 1
15 }
  1. A

    Number of authors who have not published a book in the most recent year

  2. B

    Number of authors who have not published maximum number of books

  3. C

    Number of books which are not published in the most recent year

  4. D

    Number of authors who have published a book in the most recent year

Show answer

Correct answer

  • C

    Number of books which are not published in the most recent year

Question 3 of 14 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Qualifier paper sat on 10 Jul 2022, in the May 2022 term (IIT M QUALIFIER EXAM QPA1 10 July 2022). It carries 2 marks.

More questions from this paper

  1. Q1The following pseudocode is executed using the "Words" dataset. What will A represent at the end of the execution?
  2. Q2The following pseudocode is executed using the "Words" dataset. At the end of the execution, A is set to True if there …
  3. Q4Let A be an author who has written a book in the "Library" dataset and B be a positive integer. What does the procedure…
  4. Q5The following pseudocode is executed using the "Words" dataset. What will count represent at the end of the execution?
  5. Q6miniSum accepts three distinct numbers as parameters and returns the sum of two smallest numbers. Choose the correct co…
  6. Q7The following pseudocode is executed using the "Library" dataset. What will count represent at the end of the execution?
  7. Q8The following pseudocode is executed using the "Words" dataset. At the end of the execution, C captures the number of n…
  8. Q9The following pseudocode is executed using the "Words" dataset. What will count. represent at the end of the execution?
  9. Q10The following pseudocode is executed using the "Words" dataset. At the end of the execution, A captures the number of s…
  10. Q11The following pseudocode is executed using the "Library" dataset. At the end of the execution, A captures the number of…
  11. Q12The following pseudocode is executed using the "Scores" dataset. At the end of the execution, C captures the number of …
  12. Q13The following pseudocode is executed using the "Library" dataset. Assume that every author has published at least two b…
  13. Q14The following pseudocode is executed using the "Library" dataset. Assume that every author has published at least two b…