CS basics · free timed test

Placement CS Fundamentals Test

A timed sectional test: 10 to 50 questions (you choose) on 8 topics, drawn fresh each attempt from 362 questions; no negative marking. Pass mark 60%.

Computer science fundamentals for technical rounds of IT campus hiring: C and C++ output, object-oriented programming, data structures, algorithms and complexity, DBMS and SQL, operating systems, computer networks, and Java and Python basics. Pick 10, 25 or 50 multiple-choice questions; no negative marking. This is not a coding round.

  • Sectional
  • 20 min
  • 25 questions
  • Pass 60%
  • No negative marking

Set up your test

Questions · fresh ones every attempt

Drawn from 362 questions, so every retake is a new paper.

What it covers

10 to 50 questions, four options each, drawn fresh on every attempt from these topics. The result page scores every topic separately so you can see where the marks went.

  • C and C++ output
  • Object-oriented programming
  • Data structures
  • Algorithms and complexity
  • Database management (DBMS and SQL)
  • Operating systems
  • Computer networks
  • Java and Python basics

Good forplacementsCS fundamentalstechnical MCQDBMSoperating systemsOOPcampus hiring

Sample questions

6 questions of the kind Placement CS Fundamentals Test asks, with answers. Try each one before you open the answer; the test itself draws a fresh set.

  1. Q1 · Algorithms and complexity

    A directed graph has edges A->B, A->C, B->D, C->D and D->E. Which of these is a valid topological order?

    • A.B A C D E
    • B.A B C E D
    • C.A C B D E
    • D.A B D C E
    Show answer

    Answer: C. A C B D E

    Every edge u->v needs u before v. A C B D E satisfies all five edges. A B D C E puts D before C despite C->D; B A C D E puts B before A; A B C E D puts E before D. B and C can come in either order, since neither depends on the other.

  2. Q2 · C and C++ output

    What does this C++ program print? (Assume the needed standard headers are included and using namespace std; is in effect.) int main() { int v[] = {4, 1, 3, 2}; sort(v, v + 4); cout << v[1] << v[3]; return 0; }

    • A.24
    • B.14
    • C.23
    • D.34
    Show answer

    Answer: A. 24

    std::sort(v, v + 4) sorts the whole array in ascending order, giving {1, 2, 3, 4}. Indices start at 0, so v[1] is 2 and v[3] is 4, and the output is 24. 14 reads index 0 instead of index 1, and 23 treats v[3] as the third element.

  3. Q3 · Data structures

    What is the maximum number of nodes in a binary tree of height 4, with the root at height 0?

    • A.15
    • B.16
    • C.32
    • D.31
    Show answer

    Answer: D. 31

    Level k can hold at most 2 to the power k nodes. Levels 0 to 4 give 1 + 2 + 4 + 8 + 16 = 31, which is 2 to the power (h + 1) minus 1. 15 is the answer for height 3, and 16 is the number of nodes on level 4 alone.

  4. Q4 · Java and Python basics

    What does this Python code print? marks = {"Riya": 82} print(marks.get("Aman", 0))

    • A.None
    • B.82
    • C.A KeyError is raised
    • D.0
    Show answer

    Answer: D. 0

    dict.get(key, default) returns the value for key if it exists, otherwise the default. "Aman" is not a key, so 0 is printed. Without the second argument, get would return None. Only the subscript form marks["Aman"] raises a KeyError for a missing key.

  5. Q5 · Computer networks

    Why do Wi-Fi networks use CSMA/CA instead of CSMA/CD?

    • A.Wireless links have no collisions at all
    • B.Radio signals travel faster than signals on cables
    • C.CSMA/CD needs IP addresses, which Wi-Fi does not use
    • D.A wireless station usually cannot detect a collision while transmitting, and hidden stations may not hear each other
    Show answer

    Answer: D. A wireless station usually cannot detect a collision while transmitting, and hidden stations may not hear each other

    A radio transmitting at full power cannot reliably hear a much weaker colliding signal, and two stations out of each other's range can both reach the access point (the hidden-terminal problem). So 802.11 tries to avoid collisions with random backoff, optional RTS/CTS and acknowledgements instead of detecting them.

  6. Q6 · Object-oriented programming

    In C++, class D : private B { }; What access do B's public members have inside D's interface?

    • A.They stay public in D
    • B.They become protected in D
    • C.They are not inherited at all
    • D.They become private members of D
    Show answer

    Answer: D. They become private members of D

    With private inheritance, public and protected members of B become private members of D. D's own member functions can still use them, but outside code and D's subclasses cannot. Private members of B stay inaccessible to D either way.

Free guides

Read the syllabus and pattern first

All guides

How the test runs

  • Server timer: it keeps running if you reload or lose signal
  • Answers save as you go; whatever you answered submits at zero
  • No negative marking · one attempt running at a time
  • The timer runs on the server

    It starts when you press Start and keeps running if you reload, switch tabs or lose connection. Under a minute left, the clock turns red.

  • Answers save as you go

    Every change is saved within seconds and again every ten seconds. Leave and come back while time remains and the test resumes where you were.

  • Auto-submit at zero

    When the clock hits zero, whatever you have answered is submitted and scored. Unanswered questions count as wrong; there is no negative marking.

  • One attempt in progress

    You can have one attempt of this test running at a time. Submit it (or let it expire) to start a fresh one with a new timer.

  • Keyboard friendly

    Keys 1 to 4 choose an option, the left and right arrows move between questions, and the palette jumps anywhere. Flag a question to come back to it.

After the test

The score tells you where you stand; these are where the preparation happens.

More tests in cs basics

All tests

20 min · 25 Qs

Free · pass 60%