Docsity

COMPUTER SCIENCE FUNDAMENTALS EXAMINATION. Programming, Data Structures, Algorithms, and, Exams of Computer Science

Toggle sidebar
bg1
COMPUTER SCIENCE FUNDAMENTALS EXAMINATION.
Programming, Data Structures, Algorithms, and Computer
Systems.
Computer Science โ€” Computer Science Fundamentals.
Questions and Answers.
1. What is computer science?
Answer: Computer science is the study of computation, information processing,
algorithms, software, hardware, and computational systems.
2. What is an algorithm?
Answer: An algorithm is a finite, ordered set of unambiguous instructions for
solving a problem or performing a task.
3. What is a program?
Answer: A program is a set of instructions written in a programming language that
directs a computer to perform operations.
4. What is a programming language?
Answer: A programming language is a formal language used to write instructions
that can be understood and executed by a computer.
5. What is a variable?
Answer: A variable is a named storage location whose value can change during
program execution.
6. What is a constant?
Answer: A constant is a value that does not change during program execution.
7. What is a data type?
Answer: A data type defines the kind of value a variable can store and the
operations that can be performed on it.
pf3
pf4
pf5

Partial preview of the text

Download COMPUTER SCIENCE FUNDAMENTALS EXAMINATION. Programming, Data Structures, Algorithms, and and more Exams Computer Science in PDF only on Docsity!

COMPUTER SCIENCE FUNDAMENTALS EXAMINATION.

Programming, Data Structures, Algorithms, and Computer

Systems.

Computer Science โ€” Computer Science Fundamentals.

Questions and Answers.

  1. What is computer science? Answer: Computer science is the study of computation, information processing, algorithms, software, hardware, and computational systems.
  2. What is an algorithm? Answer: An algorithm is a finite, ordered set of unambiguous instructions for solving a problem or performing a task.
  3. What is a program? Answer: A program is a set of instructions written in a programming language that directs a computer to perform operations.
  4. What is a programming language? Answer: A programming language is a formal language used to write instructions that can be understood and executed by a computer.
  5. What is a variable? Answer: A variable is a named storage location whose value can change during program execution.
  6. What is a constant? Answer: A constant is a value that does not change during program execution.
  7. What is a data type? Answer: A data type defines the kind of value a variable can store and the operations that can be performed on it.
  1. Name four common primitive data types. Answer: Common primitive data types include integer, floating-point number, character, and Boolean.
  2. What is a Boolean value? Answer: A Boolean value is either true or false. 10.What is a conditional statement? Answer: A conditional statement executes different instructions depending on whether a specified condition is true or false. 11.What is a loop? Answer: A loop repeatedly executes a block of instructions while a condition remains true or for a specified number of iterations. 12.Name two common types of loops. Answer: Common loops include for loops and while loops. 13.What is a function? Answer: A function is a reusable block of code that performs a defined task and may receive inputs and return a result. 14.What is a parameter? Answer: A parameter is a value or variable supplied to a function to influence its operation. 15.What is recursion? Answer: Recursion is a programming technique in which a function calls itself to solve smaller versions of the same problem. 16.What is an array? Answer: An array is a collection of elements stored in an ordered structure, usually accessed using an index.

Answer: Binary search repeatedly divides a sorted list into halves to locate a target efficiently. 26.What condition is required for binary search? Answer: The data must generally be sorted before binary search can be applied. 27.What is sorting? Answer: Sorting is arranging data according to a specified order, such as ascending or descending order. 28.What is algorithmic complexity? Answer: Algorithmic complexity measures the computational resources, such as time or memory, required as input size increases. 29.What is Big O notation? Answer: Big O notation describes the upper-bound growth rate of an algorithmโ€™s resource requirements. 30.What is object-oriented programming? Answer: Object-oriented programming organizes software around objects that contain data and methods. 31.What is a class? Answer: A class is a blueprint defining the attributes and behaviours of objects. 32.What is an object? Answer: An object is an instance of a class containing specific data and capable of performing defined operations. 33.What is inheritance? Answer: Inheritance allows a class to acquire or extend attributes and methods from another class. 34.What is encapsulation?

Answer: Encapsulation combines data and methods and restricts direct access to internal implementation details. 35.What is polymorphism? Answer: Polymorphism allows different classes or objects to respond to the same operation in different ways. 36.What is an operating system? Answer: An operating system manages computer hardware and software resources and provides services for application programs. 37.Name four functions of an operating system. Answer: Process management, memory management, file management, device management, security, and user-interface provision are common functions. 38.What is a process? Answer: A process is a program that is currently executing, together with its associated resources and state. 39.What is virtual memory? Answer: Virtual memory uses secondary storage to extend apparent main memory and allow programs to operate when physical memory is limited. 40.What is a database? Answer: A database is an organized collection of related data that can be stored, accessed, managed, and updated. 41.What is a relational database? Answer: A relational database stores data in tables containing rows and columns and represents relationships between tables. 42.What is a primary key? Answer: A primary key is a field or combination of fields that uniquely identifies each record in a table.