Computer ScienceComputer Scienceeasy

Computer Science Quiz

Free practice quiz on Computer Science Quiz with detailed solutions for government exam preparation.

25
Minutes
25
Marks
FREE
Access

About This Quiz

Computer Science Quiz is a free, 25-minute, 25-mark practice quiz on AajExam rated at easy difficulty, designed to help candidates preparing for SSC, UPSC, Banking, Railway and State PSC government competitive exams sharpen their command of Computer Science (Computer Science). Every question on this quiz ships with a detailed step-by-step solution so you don't just learn the right answer — you learn the reasoning and shortcuts top scorers use to crack similar questions faster on the actual exam day. Why Computer Science Quiz matters in your preparation: government exam-conducting bodies repeatedly draw questions from the same chapters and the same skill-clusters across recruitment cycles. By attempting focused topic-wise quizzes like this one, you build pattern recognition — the ability to spot which formula, rule or trick applies the moment you see a question. Toppers consistently report that 5-10 quizzes on a single topic delivers more exam-day score gain than 20+ unfocused full-length mocks, because targeted drilling exposes your specific sub-topic weaknesses with surgical precision. How to use this quiz effectively: attempt it in one sitting under the 25-minute timer, without referring to notes or external resources — simulate exam-day conditions exactly. After submission, review the auto-generated analytics to see your accuracy, time per question and section-wise performance. Then go through every wrong and skipped question with the explanation, mentally tagging the underlying concept rather than just memorising the answer. Revisit this quiz after 7-10 days; your second attempt should be 15-20% faster with noticeably better accuracy. After mastering this quiz, explore the 6 related quizzes linked below to broaden your topic coverage. AajExam quiz design principles: every quiz on the platform is curated by subject experts using the actual question formats, difficulty distributions and time pressures of the target government exams. We deliberately avoid generic "textbook" questions in favour of exam-replicating ones. Solutions are written in plain English (and Hindi where source material was bilingual), with step-by-step working for quantitative problems, grammar rules for English questions, and direct reference statements for general awareness items. Performance analytics after each attempt include accuracy, attempt rate, time spent per question, and an estimated all-India percentile so you know exactly where you stand against other candidates. This quiz is completely free to attempt. You only need a free AajExam account to track your performance across attempts, view detailed solutions and unlock the platform-wide analytics dashboard. The platform is mobile-friendly and works seamlessly on smartphones, tablets and desktops — so you can sharpen your Computer Science (Computer Science) skills in any spare 15-minute window.

Computer Science Quiz — Questions with Solutions

All 25 questions from this quiz with the correct answer and explanation. Attempt them yourself first, then open each solution to check your reasoning.

  1. Q1.A compiler is used to:

    • A.Translate high-level code into machine code
    • B.Print documents
    • C.Connect to the internet
    • D.Store data permanently
    Show answer

    Answer: A. Translate high-level code into machine code

    A compiler translates source code into executable machine code.

  2. Q2.Which data structure follows the Last-In-First-Out (LIFO) principle?

    • A.Queue
    • B.Stack
    • C.Array
    • D.Linked list
    Show answer

    Answer: B. Stack

    A stack follows LIFO: the last element added is removed first.

  3. Q3.Which data structure follows the First-In-First-Out (FIFO) principle?

    • A.Stack
    • B.Queue
    • C.Tree
    • D.Graph
    Show answer

    Answer: B. Queue

    A queue follows FIFO: the first element added is removed first.

  4. Q4.Binary number system uses which two digits?

    • A.0 and 1
    • B.1 and 2
    • C.0 and 9
    • D.2 and 8
    Show answer

    Answer: A. 0 and 1

    Binary numbers are represented using only 0 and 1.

  5. Q5.Which of the following is an object-oriented programming language?

    • A.Java
    • B.HTML
    • C.CSS
    • D.SQL
    Show answer

    Answer: A. Java

    Java is a widely used object-oriented programming language.

  6. Q6.An algorithm is best described as:

    • A.A step-by-step procedure to solve a problem
    • B.A type of hardware
    • C.A programming language
    • D.A network protocol
    Show answer

    Answer: A. A step-by-step procedure to solve a problem

    An algorithm is a defined sequence of steps to solve a problem.

  7. Q7.Which of these is a type of computer memory that is non-volatile?

    • A.RAM
    • B.ROM
    • C.Cache
    • D.Register
    Show answer

    Answer: B. ROM

    ROM retains data even when power is switched off.

  8. Q8.SQL is mainly used for:

    • A.Managing and querying databases
    • B.Designing web pages
    • C.Editing images
    • D.Playing music
    Show answer

    Answer: A. Managing and querying databases

    SQL (Structured Query Language) is used to manage relational databases.

  9. Q9.Which sorting algorithm repeatedly swaps adjacent elements if they are in the wrong order?

    • A.Bubble sort
    • B.Binary search
    • C.Merge sort (not primarily)
    • D.Quick sort (not primarily)
    Show answer

    Answer: A. Bubble sort

    Bubble sort works by repeatedly swapping adjacent out-of-order elements.

  10. Q10.A variable in programming is used to:

    • A.Store data that can change
    • B.Print output only
    • C.Connect to a network
    • D.Format text only
    Show answer

    Answer: A. Store data that can change

    Variables store data values that can be modified during program execution.

  11. Q11.Which of these is an example of a high-level programming language?

    • A.Python
    • B.Assembly language
    • C.Machine code
    • D.Binary code
    Show answer

    Answer: A. Python

    Python is a high-level, human-readable programming language.

  12. Q12.A loop in programming is used to:

    • A.Repeat a block of code multiple times
    • B.Delete a program
    • C.Compile code
    • D.Encrypt data
    Show answer

    Answer: A. Repeat a block of code multiple times

    Loops allow repeated execution of a code block.

  13. Q13.Which logic gate outputs true only when both inputs are true?

    • A.OR gate
    • B.AND gate
    • C.NOT gate
    • D.XOR gate
    Show answer

    Answer: B. AND gate

    An AND gate outputs true only if all its inputs are true.

  14. Q14.Which of the following best describes a 'database'?

    • A.An organized collection of data
    • B.A single computer file
    • C.A type of printer
    • D.A network cable
    Show answer

    Answer: A. An organized collection of data

    A database is a structured collection of data.

  15. Q15.Which memory is used to speed up processor access to frequently used data?

    • A.Cache memory
    • B.Hard disk
    • C.ROM
    • D.Optical disk
    Show answer

    Answer: A. Cache memory

    Cache memory provides fast access to frequently used data.

  16. Q16.Which of the following is a version control system used in software development?

    • A.Git
    • B.MS Word
    • C.Excel
    • D.Photoshop
    Show answer

    Answer: A. Git

    Git is widely used for tracking changes in source code.

  17. Q17.An IP address version that uses 32-bit addressing is called:

    • A.IPv4
    • B.IPv6
    • C.IPv8
    • D.IPv2
    Show answer

    Answer: A. IPv4

    IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses.

  18. Q18.Which of these best describes 'debugging'?

    • A.Finding and fixing errors in code
    • B.Deleting a program
    • C.Compiling source code
    • D.Formatting a hard disk
    Show answer

    Answer: A. Finding and fixing errors in code

    Debugging is the process of identifying and correcting code errors.

  19. Q19.A 'function' in programming is best described as:

    • A.A reusable block of code that performs a specific task
    • B.A type of variable
    • C.A hardware component
    • D.A network device
    Show answer

    Answer: A. A reusable block of code that performs a specific task

    Functions encapsulate reusable logic for specific tasks.

  20. Q20.Which number system is commonly used to represent memory addresses in a compact form?

    • A.Hexadecimal
    • B.Binary only
    • C.Decimal only
    • D.Roman numerals
    Show answer

    Answer: A. Hexadecimal

    Hexadecimal is often used for compact representation of binary data/addresses.

  21. Q21.Which of the following best defines an 'operating system'?

    • A.Software that manages hardware resources and runs applications
    • B.A hardware component
    • C.A type of virus
    • D.A network cable
    Show answer

    Answer: A. Software that manages hardware resources and runs applications

    An OS manages hardware and provides a platform for applications.

  22. Q22.In object-oriented programming, encapsulation refers to:

    • A.Bundling data and methods that operate on that data together
    • B.Deleting unused variables
    • C.Compiling code faster
    • D.Connecting to the internet
    Show answer

    Answer: A. Bundling data and methods that operate on that data together

    Encapsulation bundles data and related methods within a single unit (class).

  23. Q23.Which of these is a common file extension for a Python script?

    • A..py
    • B..exe
    • C..txt
    • D..doc
    Show answer

    Answer: A. .py

    Python scripts commonly use the .py file extension.

  24. Q24.A 'bug' in programming refers to:

    • A.An error or flaw in a program
    • B.A type of computer virus only
    • C.A hardware fault only
    • D.A network attack
    Show answer

    Answer: A. An error or flaw in a program

    A bug is a defect or error that causes a program to behave incorrectly.

  25. Q25.Which of these is an example of an interpreted programming language?

    • A.Python
    • B.C (compiled)
    • C.C++ (compiled)
    • D.Assembly
    Show answer

    Answer: A. Python

    Python code is generally executed by an interpreter rather than compiled directly to machine code.

Loading quiz preview…

Frequently Asked Questions

Is Computer Science Quiz free to attempt on AajExam?

Yes. Computer Science Quiz is completely free. You only need a free AajExam account to track your score, view detailed solutions and unlock cross-attempt analytics.

How long does it take to complete Computer Science Quiz?

Computer Science Quiz runs on a 25-minute timer in real exam-style conditions. The clock starts the moment you click Start, mirroring the time pressure of the actual exam.

Are detailed solutions provided?

Yes. Every question on Computer Science Quiz ships with a complete step-by-step solution, the underlying concept, and (where applicable) shortcut tricks. You can also discuss any question with the AajExam community.

Can I attempt Computer Science Quiz multiple times?

Yes. You can attempt this quiz as many times as you like. Each attempt is recorded separately so you can track improvement in score, accuracy and time-management.

Which government exams does this quiz prepare me for?

Computer Science questions appear regularly in SSC CGL, CHSL, MTS, GD; IBPS PO, Clerk; SBI PO, Clerk; RRB NTPC, Group D; UPSC prelims and most State PSC exams. The specific weightage varies by exam — check the exam pattern on the corresponding AajExam exam page for details.

Related Computer Science Quizzes