160 Programming MCQs Questions with Solutions

160 programming mcqs questions across 4 topics, each with a time target, hints, a worked solution and an approach note.

  • Topics: 4
  • Questions: 160
  • Cost: Free, unlimited on every plan

Pseudocode, output prediction and core computer science — the technical section of a placement paper.

Programming MCQs in placement papers

The programming section asks you to trace code, predict its output and recall computer-science facts, all as multiple choice. Eleven of the 29 patterns in the mock-test catalogue include one, and in some it outweighs the aptitude sections.

How it is timed

Recall questions run at a minute or less: 30 in 25 minutes in the Deloitte-modelled Technical Skills section, 30 in 30 in the Morgan Stanley-modelled CS Fundamentals and 15 in 15 in the HCLTech-modelled Technical section. Tracing gets more time: the Infosys-modelled Pseudocode section allows 2 minutes a question, the Morgan Stanley-modelled Pseudo Code nearly 3 and the Zoho-modelled Technical section four and a half. The Accenture-modelled Pseudo Code block has 18 questions, as many as that paper's largest cognitive section, and the Capgemini-modelled Technical section is 40 questions in 45 minutes. In the pattern modelled on Tech Mahindra a wrong answer costs a quarter of a mark.

How to practise

Begin with Pseudocode and Programming Fundamentals, the output-prediction core, and trace with a written table of every variable's value rather than predicting from the shape of the code. Then make Data Structures & Algorithms and OS, DBMS & Networks a matter of recall: complexities, scheduling, normal forms, SQL clause order and the OSI layers.

Typical traps

Ignoring the question's own conventions, such as whether / is integer division and whether arrays start at 0 or 1; and misreading a loop bound by one, which changes every value printed after it.

Programming MCQs topics

  • Pseudocode 40 questions — Trace the loop, print the output — the section Infosys and Wipro lean on.
  • Programming Fundamentals 40 questions — Operators, control flow, functions, pointers and output prediction in C, Java and Python.
  • Data Structures & Algorithms 40 questions — Arrays, linked lists, stacks, trees, sorting and complexity, asked as MCQs.
  • OS, DBMS & Networks 40 questions — Core computer science: processes, scheduling, SQL, normalisation and the OSI layers.