University (CU) Q&A Practice Quiz
1.What is a programming language?
Answer: A programming language is a formal language used to write computer
programs.
2.What is the difference between a high-level programming language and a low-level
programming language?
Answer: A high-level programming language is designed to be easy for humans to
read and write, while a low-level programming language is closer to the machine
code that a computer understands.
3.What is a compiler?
Answer: A compiler is a program that translates source code written in a
programming language into machine code that can be executed by a computer.
4.What is an interpreter?
Answer: An interpreter is a program that executes source code written in a
programming language directly, without compiling it first.
5.What is the difference between a compiler and an interpreter?
Answer: A compiler translates source code into machine code before execution,
while an interpreter executes source code directly.
6.What is an algorithm?
Answer: An algorithm is a set of instructions that a computer follows to solve a
particular problem.
7.What is a variable?
Answer: A variable is a named location in memory that stores a value that can be
used by a program.
8.What is a data type?
, Answer: A data type is a classification of data that specifies the type of values that
can be stored in a variable.
9.What is a loop?
Answer: A loop is a control structure that allows a program to repeat a set of
instructions multiple times.
10.What is a conditional statement?
Answer: A conditional statement is a control structure that allows a program to
execute different sets of instructions depending on the value of a condition.
11.What is object-oriented programming?
Object-oriented programming is a programming paradigm that uses objects to
represent data and behaviour.
12.What is a class?
Answer: A class is a blueprint for creating objects in object-oriented programming.
13.What is inheritance?
Answer: Inheritance is a mechanism in object-oriented programming that allows a
subclass to inherit properties and methods from a superclass.
14.What is polymorphism?
Answer: Polymorphism is the ability of objects to take on multiple forms or
behaviours depending on the context in which they are used.
15.What is encapsulation?
Answer: Encapsulation is the practice of hiding the internal details of an object from
the outside world and exposing only the necessary interfaces.
16.What is a function?
Answer: A function is a named set of instructions that performs a specific task.