Q46.The following pseudocode is executed using the "Library" dataset. Assume that Table 1 contains all the books authored by "Narayan" only. Also assume that the `Year` field of each book is distinct in the Table. Which of the following statement(s) are correct at the end of execution of this pseudocode?
```
Procedure groupBooks(Table 1)
A = 2023, B = 0
while(Table 1 has more rows){
Read the first row Z from Table 1
if(Z.Year < A){
A = Z.Year
B = Z.SeqNo
}
Move Z to Table 2
}
while(Table 2 has more rows){
Read the first row X from Table 2
if(X.SeqNo == B){
Move X to Table 3
}
else{
Move X to Table 4
}
}
End groupBooks
```
Save
Check
Details
Q46
16 Oct 2022
Q46.The following pseudocode is executed using the "Library" dataset. Assume that Table 1 contains all the books authored by "Narayan" only. Also assume that the `Year` field of each book is distinct in the Table. Which of the following statement(s) are correct at the end of execution of this pseudocode?
```
Procedure groupBooks(Table 1)
A = 2023, B = 0
while(Table 1 has more rows){
Read the first row Z from Table 1
if(Z.Year < A){
A = Z.Year
B = Z.SeqNo
}
Move Z to Table 2
}
while(Table 2 has more rows){
Read the first row X from Table 2
if(X.SeqNo == B){
Move X to Table 3
}
else{
Move X to Table 4
}
}
End groupBooks
```