Skip to content
World MCQ Forum

Programming, Flowcharts and Database Basics MCQs

Solved MCQs on programming basics, algorithms, flowchart symbols, programming languages, errors and database concepts such as tables, records, fields and keys.

22 MCQsUpdated 27 October 2026

Here you will find the core ideas of programming and databases: algorithms and flowchart symbols, high-level and low-level languages, types of program errors, loops, and the basic terms of database management.

You do not need to be a programmer to score well in this area. Focus on definitions and the purpose of each concept, and use the explanations to understand the difference between syntax errors and logic errors.

Take as quiz
  1. 1

    A step-by-step set of instructions for solving a problem is called an:

    Correct answer: C. Algorithm

    An algorithm is a precise sequence of steps. A program is an algorithm written in a programming language.

    easy
  2. 2

    In a flowchart, which symbol represents a decision (yes/no)?

    Correct answer: A. Diamond

    A diamond shows a decision with two or more possible paths, such as "Is marks ≥ 33?".

    easy
  3. 3

    In a flowchart, which symbol represents the start or end of a process?

    Correct answer: C. Oval (terminator)

    The rounded oval, or terminator, marks where a flowchart begins and ends.

    easy
  4. 4

    In a flowchart, which symbol represents input or output?

    Correct answer: B. Parallelogram

    A parallelogram is used for input (such as reading a value) and output (such as printing a result).

    medium
  5. 5

    In a flowchart, a rectangle represents:

    Correct answer: B. A process or calculation step

    Rectangles show actions or calculations, such as "Total = A + B".

    easy
  6. 6

    The only language a computer's processor understands directly is:

    Correct answer: C. Machine language (binary code)

    Processors execute machine code made of 0s and 1s. Programs in other languages must be translated into it.

    easy
  7. 7

    Which of the following is a high-level programming language?

    Correct answer: A. Python

    High-level languages such as Python, Java and C++ use English-like words. Assembly and machine code are low-level.

    easy
  8. 8

    HTML is best described as a:

    Correct answer: D. Markup language for structuring web pages

    HTML (HyperText Markup Language) describes the structure of web content. It does not contain programming logic like loops or conditions.

    Read details
    medium
  9. 9

    An error in a program caused by breaking the rules of the programming language, such as a missing bracket, is a:

    Correct answer: B. Syntax error

    Syntax errors stop the program from being translated. Logic errors let it run but produce wrong results.

    medium
  10. 10

    A program runs but gives the wrong result, for example adding instead of subtracting. This is a:

    Correct answer: C. Logic error

    Logic errors are mistakes in the program's reasoning. The computer cannot detect them, so careful testing is needed.

    medium
  11. 11

    Finding and fixing errors in a program is called:

    Correct answer: A. Debugging

    Debugging means locating and correcting bugs (errors) in a program.

    easy
  12. 12

    In programming, a named storage location whose value can change while the program runs is called a:

    Correct answer: A. Variable

    A variable such as "total" can hold different values during execution. A constant's value stays fixed.

    easy
  13. 13

    A programming structure that repeats a set of instructions is called a:

    Correct answer: D. Loop

    Loops such as "for" and "while" repeat steps until a condition is met, for example processing every student's marks.

    easy
  14. 14

    The original program written by a programmer in a programming language is called:

    Correct answer: A. Source code

    Source code is human-readable. A compiler translates it into object or machine code.

    medium
  15. 15

    In a database table, a single row representing one item (for example one student) is called a:

    Correct answer: D. Record

    Each record holds all the data about one entry. The columns of the table are fields.

    easy
  16. 16

    In a database table, a column such as "Name" or "Roll Number" is called a:

    Correct answer: D. Field

    A field stores one type of information for every record, such as names or dates of birth.

    easy
  17. 17

    A field that uniquely identifies each record in a database table is called the:

    Correct answer: D. Primary key

    A primary key, such as a CNIC number or roll number, can never be repeated or left empty.

    medium
  18. 18

    A field in one table that refers to the primary key of another table is called a:

    Correct answer: B. Foreign key

    Foreign keys link related tables. For example, a Results table can store a Student ID that refers to the Students table.

    Read details
    medium
  19. 19

    Which SQL command is used to retrieve data from a database?

    Correct answer: D. SELECT

    SELECT reads data. INSERT adds new records, UPDATE changes existing ones and DELETE removes them.

    medium
  20. 20

    Which Microsoft Office program is a database management system?

    Correct answer: D. Access

    Microsoft Access stores data in related tables and provides queries, forms and reports.

    easy