wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz on Lesson 1 CSU3200

Total questions: 33

Worksheet time: 3hrs 45mins

Name
Class
Date
1.

Which of the following statements is INCORRECT regarding programming languages?

a)

Programming languages are used to give instructions to a computer.

b)

Lower-level programming languages are closer to the language a computer directly understands.

c)

Higher-level programming languages are generally easier for humans to read and write.

d)

All programming languages are equally close to the computer's native language, varying only in syntax.

2.

What is the primary role of a computer programmer?

a)

To repair computer systems when they break down.

b)

To market and sell computer software.

c)

To design computer hardware components.

d)

To create instructions that tell a computer what to do.

3.

Which of the following best defines 'computer programming'?

a)

The art of writing clear and efficient instructions for a computer to perform a task.

b)

The study of computer operating systems.

c)

The process of assembling computer hardware.

d)

The act of Browse the internet using a computer.

4.

What is the main purpose of a 'programming language'?

a)

To encrypt data for secure transmission over networks.

b)

To provide a standardized way for humans to write instructions that a computer can understand and execute.

c)

To allow computers to communicate with each other directly.

d)

To translate human spoken language into computer machine code.

5.

Which characteristic is typically associated with a 'low-level' programming language?

a)

It is easy for human programmers to understand and write.

b)

It is highly portable across different computer architectures.

c)

It offers extensive built-in functions for complex tasks.

d)

It closely resembles the machine code that a computer's processor directly executes.

6.

What is a benefit of using a 'high-level' programming language?

a)

It is generally more abstract and easier for human programmers to read, write, and debug.

b)

It provides maximum control over system resources at the expense of readability.

c)

It requires less compilation time compared to low-level languages.

d)

It allows direct manipulation of a computer's hardware registers.

7.

What is the relationship between 'computer' and 'computer programming'?

a)

Computer programming creates the instructions that enable a computer to perform tasks.

b)

A computer only functions without any programming.

c)

Computer programming is the set of physical components that make up a computer.

d)

A computer is only a tool for computer programming, nothing more.

8.

Which of these tasks would typically be performed by a computer programmer?

a)

Designing a graphical logo for a company.

b)

Troubleshooting a Wi-Fi connection issue.

c)

Assembling a new personal computer from parts.

d)

Writing code to develop a new mobile application.

9.

Why are there different programming languages, some 'lower' and some 'higher'?

a)

To confuse programmers and make learning more difficult.

b)

Because some computers can only understand specific types of languages.

c)

The distinction is purely historical and no longer relevant in modern programming.

d)

To offer different levels of abstraction and control, suitable for various programming needs and complexity.

10.

Which statement accurately describes 'what is programming'?

a)

It is the process of translating human thoughts directly into computer actions.

b)

It is the process of creating a set of instructions that computers can understand and follow to perform a specific task.

c)

It is the study of how computers are built and designed.

d)

It is the act of repairing broken computers.

11.

Which of the following statements is TRUE about machine language?

a)

It is the only language that a computer directly understands and executes.

b)

It primarily consists of alphanumeric characters and symbols.

c)

It is a high-level programming language easily understood by humans.

d)

It is a universal language understood by all computers regardless of their architecture.

12.

Why is machine language considered nearly impossible for humans to use for programming?

a)

Because it consists entirely of complex mathematical equations.

b)

Because it frequently changes and updates, making it hard to keep up.

c)

Because it requires specialized hardware to write and debug.

d)

Because it is composed solely of binary digits (numbers), making it difficult to read and write.

13.

What is the fundamental building block of machine language instructions?

a)

Decimal numbers (0-9)

b)

Binary digits (0s and 1s)

c)

Alphanumeric characters

d)

Symbols and special characters

14.

Which statement accurately describes the universality of machine language?

a)

Only supercomputers use machine language; personal computers use a different system.

b)

Each unique computer hardware architecture has its own specific machine language.

c)

Machine language is a universal standard, allowing programs to run on any computer without modification.

d)

Every computer, regardless of its design, understands the exact same machine language.

15.

Given that machine language consists entirely of numbers, what is a direct consequence for human programmers?

a)

It allows programmers to write code that is easily transferable between different computer systems.

b)

It necessitates the use of higher-level languages and tools for practical human programming.

c)

It makes programming faster and more efficient for humans.

d)

It simplifies the debugging process due to its clear structure.

16.

What is the primary purpose of Assembly language in relation to machine language?

a)

To replace the difficult-to-use numerical (1s and 0s) instructions of machine language with human-readable abbreviations.

b)

To enable cross-platform compatibility for all software applications.

c)

To allow computers to connect to the internet more efficiently.

d)

To design the physical components of a computer's central processing unit (CPU).

17.

What is the main advantage of using a high-level programming language over a low-level language?

a)

It is generally easier for humans to read, write, and understand the code.

b)

It is written entirely in binary digits, making it faster to execute.

c)

It provides more direct control over the computer's hardware components.

d)

It eliminates the need for any form of translation before execution.

18.

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

a)

It requires the programmer to manage memory addresses manually.

b)

It uses commands and structures that are closer to human language and mathematical notation.

c)

It is executed directly by the CPU without any translation.

d)

It is machine-dependent, meaning programs are not portable.

19.

Which programming language would be preferred?

a)

Creating the operating system kernel from scratch.

b)

Optimizing a very specific part of a CPU's instruction set for maximum performance.

c)

Developing a complex web application or a mobile app.

d)

Writing a device driver that directly interacts with specific hardware components.

20.

Which of the following best describes a 'natural language'?

a)

A specialized language used only by computers to communicate with each other.

b)

A human language (like English, Sinhala, or Tamil) developed through evolution and used for everyday communication.

c)

A rigid, formal language designed specifically for writing computer programs.

d)

A secret code used to encrypt messages between different software applications.

21.

Why is it challenging for computers to directly understand and process 'natural language' without special programming?

a)

Natural languages are too simple for computers to analyze.

b)

Natural languages are inherently ambiguous, context-dependent, and have vast, evolving vocabularies and grammars.

c)

Computers can only understand languages that consist entirely of numbers.

d)

Humans intentionally make natural languages complicated to prevent computer understanding.

22.

What is the primary function of an 'assembler'?

a)

To translate high-level programming language directly into another high-level language.

b)

To debug errors in object code before it is executed.

c)

To execute high-level programming language code line-by-line without creating an executable file.

d)

To convert assembly language programs into machine language (object code).

23.

What is 'source code' in the context of programming?

a)

The hardware instructions stored in a computer's memory chips.

b)

The original program written by a programmer in a human-readable high-level or assembly language.

c)

A list of errors found during the compilation process.

d)

The final executable program that a computer runs directly.

24.

In the context of program translation, what is the primary role of a 'preprocessor'?

a)

To execute the program line by line and check for runtime errors.

b)

To convert machine code into human-readable source code.

c)

To combine multiple object files and libraries into a single executable program.

d)

To perform text-based substitutions and inclusions in the source code before compilation.

25.

What is the main purpose of the 'linking' process in software development?

a)

To identify and fix syntax errors within the source code.

b)

To transform source code written in a high-level language into assembly language.

c)

To run the program and monitor its performance characteristics.

d)

To combine compiled object files with necessary library functions to create a final executable program.

26.

If a C program calls a function like printf() from the standard library, which component is responsible for ensuring that the printf() code is included in the final executable?

a)

The interpreter

b)

The preprocessor

c)

The compiler

d)

The linker

27.

A programmer writes a complex application using a high-level language like Python. Why must this Python code eventually be processed by a 'language translator' even though the computer only understands 'machine language'?

a)

Because natural languages are universally understood by all computers without translation.

b)

Because high-level languages offer too much direct control over hardware, which must be restricted.

c)

Because only assembly language can create executable files, not high-level languages.

d)

Because Python code needs to be converted into binary digits (0s and 1s) that the computer's CPU can execute.

28.

A software project involves multiple .c source code files and uses external functions from a pre-compiled library. Describe the correct sequence of processes involved from source code to a running executable:

a)

Execution -> Preprocessing -> Compiling -> Linking

b)

Linking -> Compiling -> Preprocessing -> Execution

c)

Preprocessing -> Compiling -> Linking -> Execution

d)

Compiling -> Linking -> Preprocessing -> Execution

29.

A programmer decides to use an 'interpreter' for a project instead of a 'compiler'. What is a likely consequence of this choice regarding the program's final form and execution speed?

a)

The program will run much faster because it generates an optimized executable file.

b)

The program will be translated entirely into object code before any part of it runs, similar to assembly language.

c)

The program will likely execute slower as it translates code line by line, and it won't produce a standalone executable.

d)

The source code will become 'machine language' and lose all human-readable elements.

30.

You are writing a program where you need to perform direct memory manipulation and optimize performance for a specific type of CPU. Which level of programming language would you most likely choose, and why?

a)

Assembly language, because it provides direct control over CPU instructions and memory, though it's machine-specific.

b)

A high-level language like Python, because it's easiest to write and debug.

c)

Machine language (binary code), because it's the only language the CPU understands.

d)

Natural language, because it's most intuitive for expressing complex operations.

31.

A computer programmer's task fundamentally involves 'creating instructions for a computer'. How do 'natural languages' present a challenge for this task that 'programming languages' overcome?

a)

Natural languages are inherently ambiguous, context-dependent, and lack the rigid, formal structure needed for direct computer execution.

b)

Programming languages are designed to be as difficult to learn as possible, unlike natural languages.

c)

Natural languages are too precise and verbose, making instruction writing cumbersome.

d)

Natural languages lack the ambiguity and context-dependence that computers require for processing.

32.

In the journey of a program from a programmer's idea to execution, what is the role of 'source code' and how does it relate to 'object code' and 'machine language'?

a)

Source code is the human-readable set of instructions, which must be translated into object code (machine language) by a translator before execution.

b)

Source code is the final executable program, while object code is a temporary file used for debugging.

c)

Machine language is only used by assemblers, while source code is used by compilers and interpreters.

d)

Object code is the programming language used by humans, and source code is the binary output.

33.

Why has the evolution of 'programming languages' moved from purely 'machine language' to increasingly 'higher-level languages', despite computers only directly understanding machine code?

a)

To standardize programming so that all computers worldwide use the exact same programming language.

b)

To enable programmers to write code that is more abstract, productive, less error-prone, and portable, improving human efficiency.

c)

To make computers faster by eliminating the need for any translation process.

d)

To allow computers to understand natural human languages directly without ambiguity.