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.
Solved MCQs on programming basics, algorithms, flowchart symbols, programming languages, errors and database concepts such as tables, records, fields and keys.
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.
Correct answer: C. Algorithm
An algorithm is a precise sequence of steps. A program is an algorithm written in a programming language.
Correct answer: A. Diamond
A diamond shows a decision with two or more possible paths, such as "Is marks ≥ 33?".
Correct answer: C. Oval (terminator)
The rounded oval, or terminator, marks where a flowchart begins and ends.
Correct answer: B. Parallelogram
A parallelogram is used for input (such as reading a value) and output (such as printing a result).
Correct answer: B. A process or calculation step
Rectangles show actions or calculations, such as "Total = A + B".
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.
Correct answer: A. Python
High-level languages such as Python, Java and C++ use English-like words. Assembly and machine code are low-level.
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 detailsCorrect answer: B. Syntax error
Syntax errors stop the program from being translated. Logic errors let it run but produce wrong results.
Correct answer: C. Logic error
Logic errors are mistakes in the program's reasoning. The computer cannot detect them, so careful testing is needed.
Correct answer: A. Debugging
Debugging means locating and correcting bugs (errors) in a program.
Correct answer: A. Variable
A variable such as "total" can hold different values during execution. A constant's value stays fixed.
Correct answer: D. Loop
Loops such as "for" and "while" repeat steps until a condition is met, for example processing every student's marks.
Correct answer: A. Source code
Source code is human-readable. A compiler translates it into object or machine code.
Correct answer: D. Record
Each record holds all the data about one entry. The columns of the table are fields.
Correct answer: D. Field
A field stores one type of information for every record, such as names or dates of birth.
Correct answer: D. Primary key
A primary key, such as a CNIC number or roll number, can never be repeated or left empty.
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 detailsCorrect answer: D. SELECT
SELECT reads data. INSERT adds new records, UPDATE changes existing ones and DELETE removes them.
Correct answer: D. Access
Microsoft Access stores data in related tables and provides queries, forms and reports.