CoreHRx Jobs

Apply in one click, save jobs and take free mock tests.

Register free Log in
Hiring? Post jobs with CoreHRx
My account
user

View & update profile

Pseudocode and Output Questions mock test: free online practice

15 to 30 random questions in 15 to 30 minutes, by the level you choose: trace loops, recursion, arrays, strings and bitwise logic in pseudocode. After you submit you get your score, your strong and weak topics, and the right answer with an explanation for every question.

Choose your level

Free with a CoreHRx Jobs account: you will be asked to sign in or create one first.

What does the Pseudocode and Output Questions mock test cover?

The test covers 13 topics across three levels. Each attempt picks 15 to 30 questions at random, by the level you choose, so every attempt is different.

  • Loops and Tracing
  • Arrays
  • Bitwise Operations
  • Functions
  • Nested Loops
  • Number Logic
  • Recursion
  • Variables and Operators
  • Complexity
  • Conditions
  • Searching and Sorting
  • Stacks, Queues and Lists
  • Strings

Sample Pseudocode and Output Questions mock test questions

One question from each level, the way they appear in the test. A new set comes on the 1st of every month. Try it, then open the answer.

  1. EasyComplexity

    What is the time complexity of this pseudocode in terms of n?

    Integer s = 0
    for (Integer i = 1; i <= n; i = i + 1)
        s = s + i
    end for
    • O(log n)
    • O(n^2)
    • O(n)
    • O(1)
    Show the answer

    Answer: O(n). The loop body does a fixed amount of work and runs once for each i from 1 to n, so the total grows in a straight line with n: O(n). O(1) would mean the time does not depend on n, which is not true when the loop runs n times.

  2. MediumConditions

    What does this pseudocode print?

    Integer years[5] = {1900, 2000, 2024, 2100, 2023}
    Integer count = 0
    for (Integer i = 0; i < 5; i = i + 1)
        Integer y = years[i]
        if ((y mod 4 == 0 and y mod 100 != 0) or y mod 400 == 0)
            count = count + 1
        end if
    end for
    Print count
    • 2
    • 1
    • 3
    • 4
    Show the answer

    Answer: 2. The rule keeps years divisible by 4 except century years, unless they are divisible by 400. 2000 (divisible by 400) and 2024 pass; 1900 and 2100 are centuries not divisible by 400, and 2023 is not divisible by 4. So count = 2. Checking only mod 4 would give 4.

  3. HardLoops and Tracing

    The body changes the loop variable. What does this pseudocode print?

    Integer count = 0
    for (Integer i = 0; i < 10; i = i + 1)
        if (i mod 2 == 0)
            i = i + 2
        end if
        count = count + 1
    end for
    Print count
    • 10
    • 6
    • 5
    • 4
    Show the answer

    Answer: 5. i takes the values 0 (becomes 2), 3, 4 (becomes 6), 7, 8 (becomes 10); after each pass the update adds 1, and when i reaches 11 the test fails. That is 5 passes. Answering 10 ignores that the body changes i; the update i = i + 1 works on the changed value.

Take the full Pseudocode and Output Questions mock test: 15 to 30 questions and 15 to 30 minutes, by level.

How is the Pseudocode and Output Questions mock test scored?

A question counts as right only when you pick exactly the right option, or all the right options where it says so; a question left blank counts as wrong. Your score is the share of the test's questions you got right (15 to 30, by level). The result also scores every topic, so you know what to revise before the interview.

  • 75% or more in a topica strength
  • 50% to 74%worth a revision
  • Under 50%a topic to work on

Pseudocode and Output Questions mock test: questions people ask

Is the Pseudocode and Output Questions mock test free?

Yes. The Pseudocode and Output Questions mock test is free. You need a free CoreHRx Jobs account to start it, so your score and the topics to work on are saved.

How many questions are in the Pseudocode and Output Questions mock test?

It depends on the level: Easy has 15 questions in 15 minutes, Medium has 20 questions in 20 minutes, Hard has 30 questions in 30 minutes. They are multiple-choice questions picked at random from a larger bank of Pseudocode and Output Questions questions at your level, so every attempt is different.

Which Pseudocode and Output Questions topics does the test cover?

The questions cover Loops and Tracing, Arrays, Bitwise Operations, Functions, Nested Loops, Number Logic, Recursion, Variables and Operators, Complexity, Conditions, Searching and Sorting, Stacks, Queues and Lists, Strings. Your result shows how you did in each topic.

Which level should I choose?

Easy: Variables, conditions and simple loops: trace the code and give the output. Medium: Nested loops, functions, arrays and strings, as most placement tests ask. Hard: Recursion, bitwise logic and multi-step traces, for top scores. Start with Easy and move up.

Can employers see my Pseudocode and Output Questions score?

Only your best Pseudocode and Output Questions score, and only when it is 60% or more. It shows on the job applications you send on CoreHRx. Lower scores stay private.

Can I take the Pseudocode and Output Questions mock test again?

Yes, up to 10 tests a day. Each attempt picks questions you have not seen recently first.

All mock tests