A) Express instructions and algorithms in a form that can be processed by a computer B) Store only photographs C) Replace computer hardware D) Measure electrical current
2. A program is best described as:
A) A physical component B) A set of instructions written to perform a task C) A network cable D) A computer monitor
3. A high-level programming language is generally:
A) Written only in binary B) Limited to one processor design C) Closer to human-readable concepts than machine instructions D) Unable to use variables
4. Source code is:
A) The final machine hardware B) A computer's power supply C) Only a flowchart D) The human-readable program written in a programming language
5. A compiler generally:
A) Translates source code into a form that can be executed by a computer B) Only checks internet access C) Stores files permanently D) Converts hardware into software
6. An interpreter generally:
A) Builds a physical circuit B) Translates and executes program instructions during execution C) Changes a monitor resolution D) Stores data in RAM permanently
7. A syntax error occurs when:
A) The computer has no electricity B) The program produces the correct output C) The program violates the rules of the programming language D) The keyboard is disconnected
8. A logical error occurs when:
A) The program cannot be typed B) The source file has no name C) The computer cannot start D) The program runs but produces an incorrect result due to faulty logic
9. A runtime error occurs:
A) While the program is executing B) Only before source code is written C) Only when a program is printed D) Only when a compiler is installed
10. A variable is used to:
A) Represent a fixed hardware component B) Store a value that may change during program execution C) Replace an operating system D) Connect two computers physically
11. A constant is a value that:
A) Must always be random B) Changes every time a program runs C) Is intended to remain unchanged during program execution D) Can only be stored in a file
12. A data type specifies:
A) The computer brand B) The programmer's name C) The screen size D) The kind of value a variable can represent
13. An integer data type is normally used for:
A) Whole numbers B) Text strings only C) Images only D) True/false values only
14. A floating-point data type is normally used for:
A) Only whole numbers B) Numbers that can represent fractional values C) Characters only D) Boolean values only
15. A Boolean value can normally be:
A) Any decimal number B) Any text string C) True or false D) Only a positive integer
16. A string is generally:
A) A physical cable B) A Boolean condition C) A numerical operator D) A sequence of characters
17. An identifier is used to:
A) Name program elements such as variables or functions B) Represent only arithmetic operators C) Store electricity D) Define a computer's screen resolution
18. A valid identifier normally should:
A) Contain spaces between every word B) Follow the naming rules of the programming language C) Begin with an arithmetic operator D) Be identical to a reserved keyword
19. A reserved word is:
A) A user-created variable B) A random character C) A word with a predefined meaning in the programming language D) A file extension
20. An assignment statement is used to:
A) Draw a flowchart B) Compare two computers C) Create a network D) Give a value to a variable
21. The assignment operator in many programming languages is used to:
A) Store the result of an expression in a variable B) Compare two values for equality only C) Terminate the program D) Declare a network connection
22. An arithmetic operator is used to:
A) Compare strings only B) Perform mathematical operations C) Create comments only D) Define a data type only
23. The remainder after integer division is obtained using the:
A) Addition operator B) Exponentiation operator C) Modulus operator D) Assignment operator
24. Relational operators are mainly used to:
A) Store files B) Create loops automatically C) Define functions D) Compare values
25. A Boolean expression produces:
A) A true or false result B) Only a string C) Only a floating-point number D) A hardware signal
26. The logical AND operator is true when:
A) At least one condition is true B) All required conditions are true C) All conditions are false D) No condition is evaluated
27. The logical OR operator is true when:
A) All conditions are false B) Exactly two conditions are false C) At least one condition is true D) No condition is evaluated
28. The logical NOT operator:
A) Adds two numbers B) Compares two strings C) Repeats a statement D) Reverses a Boolean value
29. Operator precedence determines:
A) The order in which operators in an expression are evaluated B) The number of variables allowed C) The size of the monitor D) The speed of the keyboard
30. Parentheses in an expression can be used to:
A) Delete variables B) Control or clarify the order of evaluation C) Convert integers into strings automatically D) End a program
31. An if statement is commonly used for:
A) Repeating code a fixed number of times B) Declaring a constant C) Making a decision based on a condition D) Reading a file only
32. An if-else structure provides:
A) Only one possible path B) No conditions C) Only repetition D) Alternative actions depending on a condition
33. A nested selection is:
A) A selection structure placed inside another selection structure B) A loop without a condition C) A variable inside a string D) A compiler error
34. A loop is useful when:
A) A statement must never execute B) Instructions need to be repeated C) Only one value is stored D) A program has no input
35. A counter-controlled loop repeats:
A) Until electricity fails B) Only when a file is deleted C) A known or controlled number of times D) Without any condition
36. A condition-controlled loop repeats based on:
A) The computer's brand B) The file extension C) The screen size D) A condition that determines whether repetition continues
37. A function is:
A) A reusable block of code designed to perform a specific task B) A physical processor C) A type of monitor D) A network protocol only
38. A parameter is:
A) The output of every program B) A value or variable supplied to a function as input C) A compiler error D) A reserved hardware address
39. A return value is:
A) The first line of a program B) A comment C) A value sent back by a function D) A loop condition only
40. Modular programming means:
A) Writing every task in one huge block B) Avoiding functions C) Using no variables D) Dividing a program into manageable modules or functions
41. A comment in source code is used to:
A) Explain code to human readers without normally affecting program execution B) Store executable instructions C) Replace all variables D) Increase processor speed
42. An algorithm can be implemented in a programming language by:
A) Ignoring its logic B) Translating its logical steps into program statements C) Removing all inputs D) Replacing every condition with a comment
43. Debugging is the process of:
A) Installing a monitor B) Designing a keyboard C) Finding and correcting errors in a program D) Deleting all source code
44. Testing a program is important because it:
A) Guarantees that no future changes are needed B) Replaces programming C) Makes hardware unnecessary D) Helps reveal errors and verify expected behaviour
45. A test case consists of:
A) Selected input data and the expected or observed result used to check a program B) Only the program name C) Only a comment D) Only a variable declaration
46. Boundary testing focuses on:
A) Only average values B) Values at or near the limits of valid input C) Only random text D) Only program comments
47. Input validation is used to:
A) Make every input valid automatically B) Increase the program's file size C) Check whether input satisfies specified requirements D) Remove all user interaction
48. An IDE commonly provides:
A) Only a calculator B) Only a printer driver C) Only an internet browser D) Tools such as a code editor, debugger and program-building support
49. An executable program is:
A) A form of program that can be run by the computer's execution environment B) Always a source-code comment C) A flowchart symbol D) A variable declaration only
50. Good programming practice includes:
A) Using unclear names and duplicated code B) Readable structure, meaningful names, testing and appropriate documentation C) Avoiding all functions D) Ignoring errors
These MCQs are prepared with reference to the FBISE HSSC-I Computer Science Assessment Framework and the National Curriculum of Pakistan 2022–23. They cover core programming concepts relevant to this chapter, including program structure, variables and data types, expressions and operators, selection and iteration, functions and modular programming, errors and debugging, testing and validation, and good programming practice.