Gce Model Questions Vol1 2022 Computer Studies Question 16

Practice objective / multiple choice question 16 from the 2022 Gce Model Questions Vol1 Computer Studies examination.

Gce Model Questions Vol1 2022 Computer Studies Objective / Multiple Choice Medium Difficulty
Question 16 GCE_MODEL_QUESTIONS_VOL1 • 2022 • COMPUTER_STUDIES • objective

Consider the following pseudo‑code where n and m are positive integers: ``` count = 0 for i = 1 to n for j = i to n if (i + j) mod 3 = 0 for k = 1 to m step 2 count = count + 1 ``` How many times is the statement `count = count + 1` executed? Express your answer in terms of \(n\) and \(m\).

Answer Options

A. \left\lfloor\frac{m}{2}\right\rfloor\left(\frac{\lfloor n/3\rfloor\bigl(\lfloor n/3\rfloor+1\bigr)}{2}+\,\lfloor\frac{n+2}{3}\rfloor\cdot\lfloor\frac{n+1}{3}\rfloor\right)
B. \left\lceil\frac{m}{2}\right\rceil\left(\frac{\lfloor n/3\rfloor\bigl(\lfloor n/3\rfloor-1\bigr)}{2}+\,\lfloor\frac{n+2}{3}\rfloor\cdot\lfloor\frac{n+1}{3}\rfloor\right)
Correct Answer C. \left\lceil\frac{m}{2}\right\rceil\left(\frac{\lfloor n/3\rfloor\bigl(\lfloor n/3\rfloor+1\bigr)}{2}+\,\lfloor\frac{n+2}{3}\rfloor\cdot\lfloor\frac{n+1}{3}\rfloor\right)
D. \left\lceil\frac{m}{2}\right\rceil\left(\frac{\lfloor n/3\rfloor\bigl(\lfloor n/3\rfloor+1\bigr)}{2}+\,\lfloor\frac{n}{3}\rfloor\cdot\lfloor\frac{n+2}{3}\rfloor\right)
Correct Answer
C
Correct Option:
\left\lceil\frac{m}{2}\right\rceil\left(\frac{\lfloor n/3\rfloor\bigl(\lfloor n/3\rfloor+1\bigr)}{2}+\,\lfloor\frac{n+2}{3}\rfloor\cdot\lfloor\frac{n+1}{3}\rfloor\right)

About This Question

This is Gce Model Questions Vol1 2022 Computer Studies Question 16. It is one of the objective questions from the 2022 Gce Model Questions Vol1 Computer Studies examination.

Difficulty level: Medium .

Master the Exam!

You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.

Unlock Full Access Available for Android & Windows
Chat with Support