Computer Science Exit Exam Material
الذهاب إلى القناة على Telegram
Welcome to the Computer Science Exit Exam Material channel! We are dedicated to empowering computer science students by providing essential resources, study materials, and expert tips Buy ads:https://telega.io/c/ComputerScienceExitExam CEO: @Filerasupport
إظهار المزيد8 018
المشتركون
+124 ساعات
+307 أيام
+5430 أيام
أرشيف المشاركات
▬▬▬▬▬▬▬▬▬▬▬▬▬▬
❇️ SYSTEM AND NETWORK ADMINISTRATION
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🖥 COMPUTER SCIENCE 🖥
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🟥PREPARED BY UNIVERSITY OF KEBRI DEHAR
▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⬇️ Join and Share for more👇
✳️ https://t.me/ComputerScienceExitExam 🎯
✳️https://t.me/ComputerScienceExitExam 🎯
✳️ https://t.me/ComputerScienceExitExam 🎯
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
For Your Feedback 👉https://t.me/ComputerScienceExitExam
▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬
❇️ EXIT EXAM MATERIAL
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🖥 COMPUTER SCIENCE 🖥
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🟥COLLECTED FROM DIFFERENT UNIVERSITY
✅INCLUDING
✅MINISTRY OF EDUCATION
▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⬇️ Join and Share for more👇
✳️ https://t.me/ComputerScienceExitExam 🎯
✳️https://t.me/ComputerScienceExitExam 🎯
✳️ https://t.me/ComputerScienceExitExam 🎯
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
For Your Feedback 👉https://t.me/Computer_science_discussion1
▬▬▬▬▬▬▬▬▬▬▬▬▬▬
INVITE AND SHARE FOR YOUR FRIENDS
▬
What is the term for a data structure that allows you to store elements in a way that ensures no duplicates are present?
a) Array
b) Set
c) Queue
d) Linked List
Answer: b) Set
Q. 92
In programming, what does the term “bitwise operator” refer to?
a) Operators that perform arithmetic operations
b) Operators that work on individual bits of data
c) Operators that compare two values
d) Operators that control program flow
Answer: b) Operators that work on individual bits of data
Q. 93
What is the primary purpose of a “while” loop in programming?
a) To perform a specific task a fixed number of times
b) To execute a block of code repeatedly as long as a condition is true
c) To create conditional statements
d) To define functions
Answer: b) To execute a block of code repeatedly as long as a condition is true
Q. 94
In programming, what does the term “API” stand for?
a) Advanced Programming Interface
b) Application Programming Interface
c) Automated Program Instruction
d) Application Program Installation
Answer: b) Application Programming Interface
Q. 95
What is the primary purpose of a “catch” block in exception handling?
a) To handle exceptions and specify alternative code
b) To create loops
c) To declare variables
d) To terminate the program
Answer: a) To handle exceptions and specify alternative code
Q. 96
What is the term for a programming construct that allows you to repeat a block of code until a specified condition is met?
a) For loop
b) While loop
c) Conditional statement
d) Function
Answer: b) While loop
Q. 97
In programming, what is a “method signature”?
a) The method’s return type
b) The method’s name and parameter list
c) The method’s access level
d) The method’s documentation
Answer: b) The method’s name and parameter list
Q. 98
What is the primary purpose of a “namespace” in programming languages like C# and C++?
a) To define a class
b) To group related classes and prevent naming conflicts
c) To declare variables
d) To store data
Answer: b) To group related classes and prevent naming conflicts
Q. 99
In object-oriented programming, what is “abstraction”?
a) The process of creating objects
b) The process of hiding complex implementation details and exposing only essential features
c) The process of acquiring properties and behaviors from a parent class
d) The use of multiple inheritance
Answer: b) The process of hiding complex implementation details and exposing only essential features
Q. 100
What is the term for a programming construct that allows you to execute a block of code repeatedly until a specified condition is met, with a guaranteed minimum of one execution?
a) For loop
b) While loop
c) Do-while loop
d) Conditional statement
Answer: c) Do-while loop
Q. 101
When designing a program, what
a) Function
b) Variable
c) Class
d) Expression
Answer: a) Function
Q. 89
What is the primary role of a “destructor” in object-oriented programming?
a) To create objects
b) To initialize object attributes
c) To destroy objects and free up resources
d) To call methods in a class
Answer: c) To destroy objects and free up resources
Q. 90
In programming, what is “concurrency”?
a) The process of converting source code to machine code
b) The execution of multiple tasks or processes simultaneously
c) The use of multiple inheritance
d) The process of designing user interfaces
Answer: b) The execution of multiple tasks or processes simultaneously
Q. 91
Q. 75
What is the primary role of a “constructor” in object-oriented programming?
a) To destroy objects
b) To create objects and initialize their attributes
c) To call methods in a class
d) To handle exceptions
Answer: b) To create objects and initialize their attributes
Q. 76
What is the term for a programming error that results in a program producing an incorrect or unintended output?
a) Syntax error
b) Compilation error
c) Logic error
d) Runtime error
Answer: c) Logic error
Q. 77
In programming, what is “modularity”?
a) The use of modules for software development
b) The process of breaking a program into smaller, self-contained units
c) The use of multiple inheritance
d) The process of designing user interfaces
Answer: b) The process of breaking a program into smaller, self-contained units
Q. 78
What is the term for a statement that does nothing and is used as a placeholder in code?
a) Null statement
b) Empty statement
c) No-operation statement
d) Placeholder statement
Answer: b) Empty statement
Q. 79
In programming, what is “code refactoring”?
a) The process of writing new code from scratch
b) The process of optimizing code for performance
c) The process of restructuring existing code to improve its quality, readability, and maintainability
d) The process of creating user interfaces
Answer: c) The process of restructuring existing code to improve its quality, readability, and maintainability
Q. 80
What is the term for a data structure that stores elements in key-value pairs?
a) Set
b) List
c) Dictionary
d) Stack
Answer: c) Dictionary
Q. 81
In programming, what does “DRY” stand for in the context of code quality?
a) Don’t Repeat Yourself
b) Do Right Yourself
c) Debug, Reuse, Yield
d) Data, Rules, Yield
Answer: a) Don’t Repeat Yourself
Q. 82
What is the purpose of the “break” statement in a switch statement?
a) To skip the current case and proceed to the next one
b) To terminate the program
c) To restart the switch statement
d) To continue to the default case
Answer: a) To skip the current case and proceed to the next one
Q. 83
In programming, what is a “namespace”?
a) A reserved keyword
b) A block of code
c) A naming convention for variables
d) A container for a set of identifiers
Answer: d) A container for a set of identifiers
Q. 84
What does the term “agile development” refer to in software development?
a) A methodology that emphasizes flexibility, collaboration, and customer feedback in the development process
b) A programming language
c) A type of data structure
d) A specific software development tool
Answer: a) A methodology that emphasizes flexibility, collaboration, and customer feedback in the development process
Q. 85
What is the purpose of a “try” block in exception handling?
a) To handle exceptions and specify alternative code
b) To create loops
c) To declare variables
d) To terminate the program
Answer: a) To handle exceptions and specify alternative code
Q. 86
In programming, what is “polymorphism”?
a) The ability of an object to take on multiple forms
b) The process of bundling data and methods that operate on that data
c) The process of creating objects
d) The process of debugging code
Answer: a) The ability of an object to take on multiple forms
Q. 87
What is the primary purpose of a “parameter” in a function or method?
a) To specify the function’s name
b) To indicate the function’s return type
c) To define the function’s behavior
d) To receive input values when the function is called
Answer: d) To receive input values when the function is called
Q. 88
What is the term for a programming construct that allows the programmer to define a reusable piece of code with a specific name?
a) To terminate the loop and exit it
b) To restart the loop from the beginning
c) To skip the current iteration and continue to the next
d) To print a message to the console
Answer: a) To terminate the loop and exit it
Q. 62
What does the term “algorithm” mean in programming?
a) A step-by-step procedure for solving a problem
b) A type of programming language
c) A data structure
d) A type of error
Answer: a) A step-by-step procedure for solving a problem
Q. 63
What is the term for a data structure that consists of an ordered collection of elements where each element has an associated index?
a) Set
b) Queue
c) List
d) Array
Answer: d) Array
Q. 64
What is the main purpose of a “switch” statement in programming?
a) To declare variables
b) To create loops
c) To provide an alternative to if-else chains for multiple conditional branches
d) To handle exceptions
Answer: c) To provide an alternative to if-else chains for multiple conditional branches
Q. 65
What is the purpose of a “do-while” loop in programming?
a) To execute a block of code repeatedly while a condition is true
b) To perform a specific task a fixed number of times
c) To define functions
d) To declare variables
Answer: a) To execute a block of code repeatedly while a condition is true
Q. 66
What does the term “bug tracking” refer to in software development?
a) The process of finding and fixing errors in a program
b) The process of writing new code
c) The process of documenting code
d) The process of compiling code
Answer: a) The process of finding and fixing errors in a program
Q. 67
In programming, what is the purpose of the “continue” statement in a loop?
a) To end the loop
b) To restart the loop from the beginning
c) To skip the current iteration and continue to the next
d) To print a message to the console
Answer: c) To skip the current iteration and continue to the next
Q. 68
What is the term for a software tool that helps programmers find errors in their code?
a) Compiler
b) Interpreter
c) Debugger
d) Linker
Answer: c) Debugger
Q. 69
In object-oriented programming, what is “inheritance”?
a) The process of bundling data and methods that operate on that data
b) The process of acquiring properties and behaviors from a parent class
c) The use of multiple inheritance
d) The process of creating objects
Answer: b) The process of acquiring properties and behaviors from a parent class
Q. 70
What is the primary purpose of a “finally” block in exception handling?
a) To handle exceptions
b) To define variables
c) To ensure that certain code is always executed, regardless of whether an exception occurs
d) To print error messages
Answer: c) To ensure that certain code is always executed, regardless of whether an exception occurs
Q. 71
Which of the following is NOT a valid data type in most programming languages?
a) Integer
b) String
c) Float
d) Loop
Answer: d) Loop
Q. 72
What is the term for the process of organizing data into a structured format for efficient storage and retrieval?
a) Compilation
b) Debugging
c) Data modeling
d) Data sorting
Answer: c) Data modeling
Q. 73
In programming, what is a “library”?
a) A collection of functions and pre-written code that can be used in a program
b) A data structure
c) A type of loop
d) A reserved keyword
Answer: a) A collection of functions and pre-written code that can be used in a program
Q. 74
What does the term “source code” refer to in programming?
a) The code that the computer executes
b) The code written by the programmer
c) The code that links different program components
d) The code used for debugging
Answer: b) The code written by the programmer
a) An error that occurs when a program runs out of memory
b) An error that occurs when the program logic is incorrect
c) An error that occurs due to a violation of the programming language’s rules for structure and format
d) An error that occurs when a program crashes
Answer: c) An error that occurs due to a violation of the programming language’s rules for structure and format
Q. 48
Which of the following is an example of a unary operator in programming?
a) +
b) –
c) *
d) /
Answer: b) –
Q. 49
What is the purpose of the “if-else” statement in programming?
a) To create loops
b) To define variables
c) To control the flow of a program based on a condition
d) To declare functions
Answer: c) To control the flow of a program based on a condition
Q. 50
What is the primary purpose of a “while” loop in programming?
a) To perform a specific task a fixed number of times
b) To execute a block of code repeatedly as long as a condition is true
c) To define a function
d) To terminate a program
Answer: b) To execute a block of code repeatedly as long as a condition is true
Q. 51
In programming, what does the term “variable scope” refer to?
a) The physical location in memory where variables are stored
b) The range or context in which a variable can be accessed and modified
c) The data type of a variable
d) The process of declaring a variable
Answer: b) The range or context in which a variable can be accessed and modified
Q. 52
What is the primary role of the “return” statement in a function?
a) To specify the function’s name
b) To indicate the function’s return type
c) To terminate the program
d) To send a value back to the calling code
Answer: d) To send a value back to the calling code
Q. 53
Which of the following is a common data structure used to represent hierarchical data?
a) Queue
b) Stack
c) Tree
d) Set
Answer: c) Tree
Q. 54
In programming, what is a “class”?
a) A data type
b) A block of code that performs a specific task
c) A template for creating objects with shared attributes and behaviors
d) A comment within the code
Answer: c) A template for creating objects with shared attributes and behaviors
Q. 55
What is the term for the process of converting human-readable source code into machine-readable instructions?
a) Compilation
b) Interpretation
c) Execution
d) Debugging
Answer: a) Compilation
Q. 56
What is the purpose of the “for” loop in programming?
a) To execute a block of code repeatedly until a condition is met
b) To perform a specific task a fixed number of times
c) To create conditional statements
d) To define functions
Answer: b) To perform a specific task a fixed number of times
Q. 57
Which of the following is an example of a reserved word in a programming language?
a) Variable
b) Function
c) If
d) Comment
Answer: c) If
Q. 58
In object-oriented programming, what is “encapsulation”?
a) The process of bundling data and methods that operate on that data
b) The process of converting source code to machine code
c) The use of multiple inheritance
d) The process of creating objects
Answer: a) The process of bundling data and methods that operate on that data
Q. 59
What is the primary purpose of a “try-catch” block in exception handling?
a) To intentionally raise exceptions
b) To create loops
c) To handle and recover from exceptions
d) To declare variables
Answer: c) To handle and recover from exceptions
Q. 60
In programming, what is the term for a named piece of code that can be reused throughout a program?
a) Function
b) Variable
c) Class
d) Statement
Answer: a) Function
Q. 61
What is the purpose of a “break” statement in a loop?
Answer: b) Declarative programming language
Q. 34
What is the term for a named storage location in a program that holds data?
a) Data structure
b) Function
c) Variable
d) Statement
Answer: c) Variable
Q. 35
What does the term “syntax” refer to in programming?
a) The set of rules that dictate the structure of valid program statements
b) A programming language’s ability to execute code
c) The process of debugging code
d) The user interface design
Answer: a) The set of rules that dictate the structure of valid program statements
Q. 36
In programming, what does the “break” statement typically do within a loop?
a) Skips the current iteration and continues with the next
b) Ends the loop and continues with the code after the loop
c) Repeats the current iteration
d) Creates an infinite loop
Answer: b) Ends the loop and continues with the code after the loop
Q. 37
What is the purpose of a function’s parameters in programming?
a) To store the function’s local variables
b) To specify the function’s name
c) To receive input values when the function is called
d) To define the function’s return type
Answer: c) To receive input values when the function is called
Q. 38
Which programming concept involves breaking a complex problem into smaller, manageable parts?
a) Abstraction
b) Encapsulation
c) Decomposition
d) Polymorphism
Answer: c) Decomposition
Q. 39
What is the primary advantage of using object-oriented programming (OOP)?
a) Faster program execution
b) Reduced memory usage
c) Enhanced code organization and reusability
d) Simplicity in syntax
Answer: c) Enhanced code organization and reusability
Q. 40
Which programming construct allows you to make decisions based on a condition?
a) Loop
b) Function
c) Class
d) Conditional statement
Answer: d) Conditional statement
Q. 41
In programming, what is a “method”?
a) A type of variable
b) A block of code that performs a specific task
c) A loop construct
d) A comment within the code
Answer: b) A block of code that performs a specific task
Q. 42
What does the term “DRY” stand for in the context of programming best practices?
a) Don’t Replicate Yourself
b) Do Right Yourself
c) Data Reusability Yearly
d) Development Ready Yet
Answer: a) Don’t Replicate Yourself
Q. 43
What is the main difference between a “while” loop and a “for” loop in programming?
a) A “while” loop is used for iteration, while a “for” loop is used for making decisions.
b) A “while” loop always runs at least once, while a “for” loop may not run at all.
c) A “for” loop is more efficient for small tasks, while a “while” loop is better for complex tasks.
d) A “while” loop and a “for” loop are functionally equivalent.
Answer: b) A “while” loop always runs at least once, while a “for” loop may not run at all.
Q. 44
In programming, what does the term “refactoring” refer to?
a) Rewriting code from scratch
b) Optimizing code for performance
c) Restructuring existing code to improve readability and maintainability
d) Adding new features to a program
Answer: c) Restructuring existing code to improve readability and maintainability
Q. 45
What is the purpose of the “else” statement in a conditional structure?
a) To end the conditional structure
b) To specify an alternate condition
c) To execute the code block unconditionally
d) To skip the current iteration
Answer: b) To specify an alternate condition
Q. 46
What is the term for a program that translates source code written by a programmer into machine code that a computer can execute?
a) Interpreter
b) Compiler
c) Debugger
d) Linker
Answer: b) Compiler
Q. 47
In programming, what is a “syntax error”?
c) They promote code reusability and modularity
d) They improve code execution speed
Answer: c) They promote code reusability and modularity
Q. 18
Which data structure allows you to store a collection of elements with unique values?
a) Array
b) Linked List
c) Set
d) Queue
Answer: c) Set
Q. 19
In object-oriented programming, what is inheritance?
a) The process of creating objects
b) The process of overriding a method
c) The process of acquiring properties and behaviors from a parent class
d) The process of debugging code
Answer: c) The process of acquiring properties and behaviors from a parent class
Q. 20
What is the purpose of exception handling in programming?
a) To create exceptions intentionally
b) To prevent code from running
c) To handle errors and unexpected situations gracefully
d) To improve code readability
Answer: c) To handle errors and unexpected situations gracefully
Q. 21
Which of the following is an example of a dynamic programming language?
a) C
b) C++
c) Java
d) JavaScript
Answer: d) JavaScript
Q. 22
What is the term for a set of rules that dictate how data is organized and stored in a computer’s memory?
a) Syntax
b) Algorithm
c) Data structure
d) Binary code
Answer: c) Data structure
Q. 23
What is a loop that continues to execute indefinitely until a specified condition is met called?
a) For loop
b) While loop
c) Infinite loop
d) Conditional loop
Answer: c) Infinite loop
Q. 24
In the context of programming, what is a “bug”?
a) A type of data structure
b) An insect that affects computers
c) An error or flaw in the code
d) A debugging tool
Answer: c) An error or flaw in the code
Q. 25
What is the purpose of a variable in programming?
a) To store and manipulate data
b) To create user interfaces
c) To define conditional statements
d) To write comments in the code
Answer: a) To store and manipulate data
Q. 26
Which of the following is an example of an imperative programming language?
a) Python
b) SQL
c) Haskell
d) Ruby
Answer: a) Python
Q. 27
What is the primary purpose of a comment in code?
a) To confuse other programmers
b) To provide documentation and explanations
c) To execute a specific task
d) To create variables
Answer: b) To provide documentation and explanations
Q. 28
What is the term for a programming error that occurs at runtime and causes a program to terminate abruptly?
a) Syntax error
b) Compilation error
c) Logic error
d) Runtime error
Answer: d) Runtime error
Q. 29
Which data structure stores elements in a first-in, first-out (FIFO) order?
a) Stack
b) Queue
c) Linked List
d) Array
Answer: b) Queue
Q. 30
What is the primary purpose of a function’s return statement in programming?
a) To terminate the program
b) To specify the input parameters
c) To indicate the function’s name
d) To return a value to the calling code
Answer: d) To return a value to the calling code
Q. 31
What is the term for the process of finding and fixing errors in a program?
a) Debugging
b) Compiling
c) Executing
d) Commenting
Answer: a) Debugging
Q. 32
In object-oriented programming, what is polymorphism?
a) The ability of an object to take on multiple forms
b) The process of creating new objects
c) The use of multiple inheritance
d) The process of encapsulating data
Answer: a) The ability of an object to take on multiple forms
Q. 33
Which type of programming language allows the programmer to specify what needs to be done rather than how to do it?
a) Procedural programming language
b) Declarative programming language
c) Object-oriented programming language
d) Functional programming language
Computer Networking and Security
0/3
Intelligent Systems
0/1
Computer Architecture and Operating Systems
0/2
Compiler and Complexity
0/2
Mock Test
0/2
Text lesson
Computer Programming-adv
Q. 1
What is the primary purpose of a programming language?
a) To communicate with computers
b) To create beautiful websites
c) To design user interfaces
d) To play video games
Answer: a) To communicate with computers
Q. 2
Which of the following is NOT a high-level programming language?
a) Python
b) C++
c) Assembly
d) Java
Answer: c) Assembly
Q. 3
What is the role of a compiler in the software development process?
a) Executes the program
b) Converts source code to machine code
c) Debugs the code
d) Generates user documentation
Answer: b) Converts source code to machine code
Q. 4
Which programming paradigm focuses on breaking down a program into smaller, reusable functions or methods?
a) Object-Oriented Programming (OOP)
b) Procedural Programming
c) Functional Programming
d) Event-Driven Programming
Answer: b) Procedural Programming
Q. 5
What does “DRY” stand for in the context of programming best practices?
a) Don’t Repeat Yourself
b) Do Right Yourself
c) Do It Right, Yesterday
d) Develop, Run, Yield
Answer: a) Don’t Repeat Yourself
Q. 6
In Python, what is the keyword used to define a function?
a) def
b) function
c) func
d) define
Answer: a) def
Q. 7
Which data structure follows the “Last In, First Out” (LIFO) principle?
a) Queue
b) Stack
c) Array
d) Linked List
Answer: b) Stack
Q. 8
What is the purpose of conditional statements in programming?
a) To control the flow of a program
b) To create loops
c) To define data structures
d) To format output
Answer: a) To control the flow of a program
Q. 9
What is the term for a variable that can be accessed from any part of a program?
a) Local variable
b) Global variable
c) Static variable
d) Dynamic variable
Answer: b) Global variable
Q. 10
Which of the following is NOT a valid primitive data type in most programming languages?
a) Integer
b) Boolean
c) String
d) Loop
Answer: d) Loop
Q. 11
What is the purpose of a loop in programming?
a) To store data
b) To execute a block of code repeatedly
c) To declare variables
d) To display output
Answer: b) To execute a block of code repeatedly
Q. 12
In object-oriented programming, what is encapsulation?
a) The process of converting source code to machine code
b) The bundling of data and methods that operate on that data
c) The process of debugging code
d) The creation of user interfaces
Answer: b) The bundling of data and methods that operate on that data
Q. 13
What does the acronym “API” stand for in programming?
a) Advanced Programming Interface
b) Application Programming Interface
c) Automated Program Instruction
d) Application Program Installation
Answer: b) Application Programming Interface
Q. 14
In programming, what is an algorithm?
a) A type of data structure
b) A set of instructions for solving a specific problem
c) A programming language
d) A hardware component
Answer: b) A set of instructions for solving a specific problem
Q. 15
Which of the following is an example of a relational operator in programming?
a) if
b) +
c) >
d) for
Answer: c) >
Q. 16
What is the purpose of version control systems like Git?
a) To write code
b) To compile code
c) To manage and track changes in source code
d) To execute code
Answer: c) To manage and track changes in source code
Q. 17
What is the primary benefit of using functions or methods in programming?
a) They make code shorter
b) They eliminate the need for conditional statements
Q. 68
What is the term for a software tool that helps programmers find errors in their code?
a) Compiler
b) Interpreter
c) Debugger
d) Linker
Answer: c) Debugger
Q. 69
In object-oriented programming, what is “inheritance”?
a) The process of bundling data and methods that operate on that data
b) The process of acquiring properties and behaviors from a parent class
c) The use of multiple inheritance
d) The process of creating objects
Answer: b) The process of acquiring properties and behaviors from a parent class
Q. 70
What is the primary purpose of a “finally” block in exception handling?
a) To handle exceptions
b) To define variables
c) To ensure that certain code is always executed, regardless of whether an exception occurs
d) To print error messages
Answer: c) To ensure that certain code is always executed, regardless of whether an exception occurs
Q. 71
Which of the following is NOT a valid data type in most programming languages?
a) Integer
b) String
c) Float
d) Loop
Answer: d) Loop
Q. 72
What is the term for the process of organizing data into a structured format for efficient storage and retrieval?
a) Compilation
b) Debugging
c) Data modeling
d) Data sorting
Answer: c) Data modeling
Q. 73
In programming, what is a “library”?
a) A collection of functions and pre-written code that can be used in a program
b) A data structure
c) A type of loop
d) A reserved keyword
Answer: a) A collection of functions and pre-written code that can be used in a program
Q. 74
What does the term “source code” refer to in programming?
a) The code that the computer executes
b) The code written by the programmer
c) The code that links different program components
d) The code used for debugging
Answer: b) The code written by the programmer
Q. 75
What is the primary role of a “constructor” in object-oriented programming?
a) To destroy objects
b) To create objects and initialize their attributes
c) To call methods in a class
d) To handle exceptions
Answer: b) To create objects and initialize their attributes
Q. 76
What is the term for a programming error that results in a program producing an incorrect or unintended output?
a) Syntax error
b) Compilation error
c) Logic error
d) Runtime error
Answer: c) Logic error
Q. 77
In programming, what is “modularity”?
a) The use of modules for software development
b) The process of breaking a program into smaller, self-contained units
c) The use of multiple inheritance
d) The process of designing user interfaces
Answer: b) The process of breaking a program into smaller, self-contained units
Q. 78
What is the term for a statement that does nothing and is used as a placeholder in code?
a) Null statement
b) Empty statement
c) No-operation statement
d) Placeholder statement
Answer: b) Empty statement
Q. 79
In programming, what is “code refactoring”?
a) The process of writing new code from scratch
b) The process of optimizing code for performance
c) The process of restructuring existing code to improve its quality, readability, and maintainability
d) The process of creating user interfaces
Answer: c) The process of restructuring existing code to improve its quality, readability, and maintainability
Q. 80
What is the term for a data structure that stores elements in key-value pairs?
a) Set
b) List
c) Dictionary
d) Stack
Answer: c) Dictionary
Curriculum
Exit Exam for Computer Science-Advanced
System Development
0/4
Programming and Algorithms
0/4
Computer Programming-adv

Text lesson
Object Oriented Programming-adv

Text lesson
Design and Analysis of Algorithms-adv

Text lesson
Data Structure and Algorithms-adv

Text lesson
Q. 54
In programming, what is a “class”?
a) A data type
b) A block of code that performs a specific task
c) A template for creating objects with shared attributes and behaviors
d) A comment within the code
Answer: c) A template for creating objects with shared attributes and behaviors
Q. 55
What is the term for the process of converting human-readable source code into machine-readable instructions?
a) Compilation
b) Interpretation
c) Execution
d) Debugging
Answer: a) Compilation
Q. 56
What is the purpose of the “for” loop in programming?
a) To execute a block of code repeatedly until a condition is met
b) To perform a specific task a fixed number of times
c) To create conditional statements
d) To define functions
Answer: b) To perform a specific task a fixed number of times
Q. 57
Which of the following is an example of a reserved word in a programming language?
a) Variable
b) Function
c) If
d) Comment
Answer: c) If
Q. 58
In object-oriented programming, what is “encapsulation”?
a) The process of bundling data and methods that operate on that data
b) The process of converting source code to machine code
c) The use of multiple inheritance
d) The process of creating objects
Answer: a) The process of bundling data and methods that operate on that data
Q. 59
What is the primary purpose of a “try-catch” block in exception handling?
a) To intentionally raise exceptions
b) To create loops
c) To handle and recover from exceptions
d) To declare variables
Answer: c) To handle and recover from exceptions
Q. 60
In programming, what is the term for a named piece of code that can be reused throughout a program?
a) Function
b) Variable
c) Class
d) Statement
Answer: a) Function
Q. 61
What is the purpose of a “break” statement in a loop?
a) To terminate the loop and exit it
b) To restart the loop from the beginning
c) To skip the current iteration and continue to the next
d) To print a message to the console
Answer: a) To terminate the loop and exit it
Q. 62
What does the term “algorithm” mean in programming?
a) A step-by-step procedure for solving a problem
b) A type of programming language
c) A data structure
d) A type of error
Answer: a) A step-by-step procedure for solving a problem
Q. 63
What is the term for a data structure that consists of an ordered collection of elements where each element has an associated index?
a) Set
b) Queue
c) List
d) Array
Answer: d) Array
Q. 64
What is the main purpose of a “switch” statement in programming?
a) To declare variables
b) To create loops
c) To provide an alternative to if-else chains for multiple conditional branches
d) To handle exceptions
Answer: c) To provide an alternative to if-else chains for multiple conditional branches
Q. 65
What is the purpose of a “do-while” loop in programming?
a) To execute a block of code repeatedly while a condition is true
b) To perform a specific task a fixed number of times
c) To define functions
d) To declare variables
Answer: a) To execute a block of code repeatedly while a condition is true
Q. 66
What does the term “bug tracking” refer to in software development?
a) The process of finding and fixing errors in a program
b) The process of writing new code
c) The process of documenting code
d) The process of compiling code
Answer: a) The process of finding and fixing errors in a program
Q. 67
In programming, what is the purpose of the “continue” statement in a loop?
a) To end the loop
b) To restart the loop from the beginning
c) To skip the current iteration and continue to the next
d) To print a message to the console
Answer: c) To skip the current iteration and continue to the next
a) A type of variable
b) A block of code that performs a specific task
c) A loop construct
d) A comment within the code
Answer: b) A block of code that performs a specific task
Q. 42
What does the term “DRY” stand for in the context of programming best practices?
a) Don’t Replicate Yourself
b) Do Right Yourself
c) Data Reusability Yearly
d) Development Ready Yet
Answer: a) Don’t Replicate Yourself
Q. 43
What is the main difference between a “while” loop and a “for” loop in programming?
a) A “while” loop is used for iteration, while a “for” loop is used for making decisions.
b) A “while” loop always runs at least once, while a “for” loop may not run at all.
c) A “for” loop is more efficient for small tasks, while a “while” loop is better for complex tasks.
d) A “while” loop and a “for” loop are functionally equivalent.
Answer: b) A “while” loop always runs at least once, while a “for” loop may not run at all.
Q. 44
In programming, what does the term “refactoring” refer to?
a) Rewriting code from scratch
b) Optimizing code for performance
c) Restructuring existing code to improve readability and maintainability
d) Adding new features to a program
Answer: c) Restructuring existing code to improve readability and maintainability
Q. 45
What is the purpose of the “else” statement in a conditional structure?
a) To end the conditional structure
b) To specify an alternate condition
c) To execute the code block unconditionally
d) To skip the current iteration
Answer: b) To specify an alternate condition
Q. 46
What is the term for a program that translates source code written by a programmer into machine code that a computer can execute?
a) Interpreter
b) Compiler
c) Debugger
d) Linker
Answer: b) Compiler
Q. 47
In programming, what is a “syntax error”?
a) An error that occurs when a program runs out of memory
b) An error that occurs when the program logic is incorrect
c) An error that occurs due to a violation of the programming language’s rules for structure and format
d) An error that occurs when a program crashes
Answer: c) An error that occurs due to a violation of the programming language’s rules for structure and format
Q. 48
Which of the following is an example of a unary operator in programming?
a) +
b) –
c) *
d) /
Answer: b) –
Q. 49
What is the purpose of the “if-else” statement in programming?
a) To create loops
b) To define variables
c) To control the flow of a program based on a condition
d) To declare functions
Answer: c) To control the flow of a program based on a condition
Q. 50
What is the primary purpose of a “while” loop in programming?
a) To perform a specific task a fixed number of times
b) To execute a block of code repeatedly as long as a condition is true
c) To define a function
d) To terminate a program
Answer: b) To execute a block of code repeatedly as long as a condition is true
Q. 51
In programming, what does the term “variable scope” refer to?
a) The physical location in memory where variables are stored
b) The range or context in which a variable can be accessed and modified
c) The data type of a variable
d) The process of declaring a variable
Answer: b) The range or context in which a variable can be accessed and modified
Q. 52
What is the primary role of the “return” statement in a function?
a) To specify the function’s name
b) To indicate the function’s return type
c) To terminate the program
d) To send a value back to the calling code
Answer: d) To send a value back to the calling code
Q. 53
Which of the following is a common data structure used to represent hierarchical data?
a) Queue
b) Stack
c) Tree
d) Set
Answer: c) Tree
Answer: a) To store and manipulate data
Q. 26
Which of the following is an example of an imperative programming language?
a) Python
b) SQL
c) Haskell
d) Ruby
Answer: a) Python
Q. 27
What is the primary purpose of a comment in code?
a) To confuse other programmers
b) To provide documentation and explanations
c) To execute a specific task
d) To create variables
Answer: b) To provide documentation and explanations
Q. 28
What is the term for a programming error that occurs at runtime and causes a program to terminate abruptly?
a) Syntax error
b) Compilation error
c) Logic error
d) Runtime error
Answer: d) Runtime error
Q. 29
Which data structure stores elements in a first-in, first-out (FIFO) order?
a) Stack
b) Queue
c) Linked List
d) Array
Answer: b) Queue
Q. 30
What is the primary purpose of a function’s return statement in programming?
a) To terminate the program
b) To specify the input parameters
c) To indicate the function’s name
d) To return a value to the calling code
Answer: d) To return a value to the calling code
Q. 31
What is the term for the process of finding and fixing errors in a program?
a) Debugging
b) Compiling
c) Executing
d) Commenting
Answer: a) Debugging
Q. 32
In object-oriented programming, what is polymorphism?
a) The ability of an object to take on multiple forms
b) The process of creating new objects
c) The use of multiple inheritance
d) The process of encapsulating data
Answer: a) The ability of an object to take on multiple forms
Q. 33
Which type of programming language allows the programmer to specify what needs to be done rather than how to do it?
a) Procedural programming language
b) Declarative programming language
c) Object-oriented programming language
d) Functional programming language
Answer: b) Declarative programming language
Q. 34
What is the term for a named storage location in a program that holds data?
a) Data structure
b) Function
c) Variable
d) Statement
Answer: c) Variable
Q. 35
What does the term “syntax” refer to in programming?
a) The set of rules that dictate the structure of valid program statements
b) A programming language’s ability to execute code
c) The process of debugging code
d) The user interface design
Answer: a) The set of rules that dictate the structure of valid program statements
Q. 36
In programming, what does the “break” statement typically do within a loop?
a) Skips the current iteration and continues with the next
b) Ends the loop and continues with the code after the loop
c) Repeats the current iteration
d) Creates an infinite loop
Answer: b) Ends the loop and continues with the code after the loop
Q. 37
What is the purpose of a function’s parameters in programming?
a) To store the function’s local variables
b) To specify the function’s name
c) To receive input values when the function is called
d) To define the function’s return type
Answer: c) To receive input values when the function is called
Q. 38
Which programming concept involves breaking a complex problem into smaller, manageable parts?
a) Abstraction
b) Encapsulation
c) Decomposition
d) Polymorphism
Answer: c) Decomposition
Q. 39
What is the primary advantage of using object-oriented programming (OOP)?
a) Faster program execution
b) Reduced memory usage
c) Enhanced code organization and reusability
d) Simplicity in syntax
Answer: c) Enhanced code organization and reusability
Q. 40
Which programming construct allows you to make decisions based on a condition?
a) Loop
b) Function
c) Class
d) Conditional statement
Answer: d) Conditional statement
Q. 41
In programming, what is a “method”?
a) Local variable
b) Global variable
c) Static variable
d) Dynamic variable
Answer: b) Global variable
Q. 10
Which of the following is NOT a valid primitive data type in most programming languages?
a) Integer
b) Boolean
c) String
d) Loop
Answer: d) Loop
Q. 11
What is the purpose of a loop in programming?
a) To store data
b) To execute a block of code repeatedly
c) To declare variables
d) To display output
Answer: b) To execute a block of code repeatedly
Q. 12
In object-oriented programming, what is encapsulation?
a) The process of converting source code to machine code
b) The bundling of data and methods that operate on that data
c) The process of debugging code
d) The creation of user interfaces
Answer: b) The bundling of data and methods that operate on that data
Q. 13
What does the acronym “API” stand for in programming?
a) Advanced Programming Interface
b) Application Programming Interface
c) Automated Program Instruction
d) Application Program Installation
Answer: b) Application Programming Interface
Q. 14
In programming, what is an algorithm?
a) A type of data structure
b) A set of instructions for solving a specific problem
c) A programming language
d) A hardware component
Answer: b) A set of instructions for solving a specific problem
Q. 15
Which of the following is an example of a relational operator in programming?
a) if
b) +
c) >
d) for
Answer: c) >
Q. 16
What is the purpose of version control systems like Git?
a) To write code
b) To compile code
c) To manage and track changes in source code
d) To execute code
Answer: c) To manage and track changes in source code
Q. 17
What is the primary benefit of using functions or methods in programming?
a) They make code shorter
b) They eliminate the need for conditional statements
c) They promote code reusability and modularity
d) They improve code execution speed
Answer: c) They promote code reusability and modularity
Q. 18
Which data structure allows you to store a collection of elements with unique values?
a) Array
b) Linked List
c) Set
d) Queue
Answer: c) Set
Q. 19
In object-oriented programming, what is inheritance?
a) The process of creating objects
b) The process of overriding a method
c) The process of acquiring properties and behaviors from a parent class
d) The process of debugging code
Answer: c) The process of acquiring properties and behaviors from a parent class
Q. 20
What is the purpose of exception handling in programming?
a) To create exceptions intentionally
b) To prevent code from running
c) To handle errors and unexpected situations gracefully
d) To improve code readability
Answer: c) To handle errors and unexpected situations gracefully
Q. 21
Which of the following is an example of a dynamic programming language?
a) C
b) C++
c) Java
d) JavaScript
Answer: d) JavaScript
Q. 22
What is the term for a set of rules that dictate how data is organized and stored in a computer’s memory?
a) Syntax
b) Algorithm
c) Data structure
d) Binary code
Answer: c) Data structure
Q. 23
What is a loop that continues to execute indefinitely until a specified condition is met called?
a) For loop
b) While loop
c) Infinite loop
d) Conditional loop
Answer: c) Infinite loop
Q. 24
In the context of programming, what is a “bug”?
a) A type of data structure
b) An insect that affects computers
c) An error or flaw in the code
d) A debugging tool
Answer: c) An error or flaw in the code
Q. 25
What is the purpose of a variable in programming?
a) To store and manipulate data
b) To create user interfaces
c) To define conditional statements
d) To write comments in the code
d) A comment within the code
Answer: c) A template for creating objects with shared attributes and behaviors
Q. 55
What is the term for the process of converting human-readable source code into machine-readable instructions?
a) Compilation
b) Interpretation
c) Execution
d) Debugging
Answer: a) Compilation
Q. 56
What is the purpose of the “for” loop in programming?
a) To execute a block of code repeatedly until a condition is met
b) To perform a specific task a fixed number of times
c) To create conditional statements
d) To define functions
Answer: b) To perform a specific task a fixed number of times
Q. 57
Which of the following is an example of a reserved word in a programming language?
a) Variable
b) Function
c) If
d) Comment
Answer: c) If
Q. 58
In object-oriented programming, what is “encapsulation”?
a) The process of bundling data and methods that operate on that data
b) The process of converting source code to machine code
c) The use of multiple inheritance
d) The process of creating objects
Answer: a) The process of bundling data and methods that operate on that data
Q. 59
What is the primary purpose of a “try-catch” block in exception handling?
a) To intentionally raise exceptions
b) To create loops
c) To handle and recover from exceptions
d) To declare variables
Answer: c) To handle and recover from exceptions
Q. 60
In programming, what is the term for a named piece of code that can be reused throughout a program?
a) Function
b) Variable
c) Class
d) Statement
Answer: a) Function
Curriculum
Exit Exam for Computer Science-Advanced
System Development
0/4
Programming and Algorithms
0/4
Computer Programming-adv

Text lesson
Object Oriented Programming-adv

Text lesson
Design and Analysis of Algorithms-adv

Text lesson
Data Structure and Algorithms-adv

Text lesson
Computer Networking and Security
0/3
Intelligent Systems
0/1
Computer Architecture and Operating Systems
0/2
Compiler and Complexity
0/2
Mock Test
0/2
Text lesson
Computer Programming-adv
Q. 1
What is the primary purpose of a programming language?
a) To communicate with computers
b) To create beautiful websites
c) To design user interfaces
d) To play video games
Answer: a) To communicate with computers
Q. 2
Which of the following is NOT a high-level programming language?
a) Python
b) C++
c) Assembly
d) Java
Answer: c) Assembly
Q. 3
What is the role of a compiler in the software development process?
a) Executes the program
b) Converts source code to machine code
c) Debugs the code
d) Generates user documentation
Answer: b) Converts source code to machine code
Q. 4
Which programming paradigm focuses on breaking down a program into smaller, reusable functions or methods?
a) Object-Oriented Programming (OOP)
b) Procedural Programming
c) Functional Programming
d) Event-Driven Programming
Answer: b) Procedural Programming
Q. 5
What does “DRY” stand for in the context of programming best practices?
a) Don’t Repeat Yourself
b) Do Right Yourself
c) Do It Right, Yesterday
d) Develop, Run, Yield
Answer: a) Don’t Repeat Yourself
Q. 6
In Python, what is the keyword used to define a function?
a) def
b) function
c) func
d) define
Answer: a) def
Q. 7
Which data structure follows the “Last In, First Out” (LIFO) principle?
a) Queue
b) Stack
c) Array
d) Linked List
Answer: b) Stack
Q. 8
What is the purpose of conditional statements in programming?
a) To control the flow of a program
b) To create loops
c) To define data structures
d) To format output
Answer: a) To control the flow of a program
Q. 9
What is the term for a variable that can be accessed from any part of a program?
Q. 42
What does the term “DRY” stand for in the context of programming best practices?
a) Don’t Replicate Yourself
b) Do Right Yourself
c) Data Reusability Yearly
d) Development Ready Yet
Answer: a) Don’t Replicate Yourself
Q. 43
What is the main difference between a “while” loop and a “for” loop in programming?
a) A “while” loop is used for iteration, while a “for” loop is used for making decisions.
b) A “while” loop always runs at least once, while a “for” loop may not run at all.
c) A “for” loop is more efficient for small tasks, while a “while” loop is better for complex tasks.
d) A “while” loop and a “for” loop are functionally equivalent.
Answer: b) A “while” loop always runs at least once, while a “for” loop may not run at all.
Q. 44
In programming, what does the term “refactoring” refer to?
a) Rewriting code from scratch
b) Optimizing code for performance
c) Restructuring existing code to improve readability and maintainability
d) Adding new features to a program
Answer: c) Restructuring existing code to improve readability and maintainability
Q. 45
What is the purpose of the “else” statement in a conditional structure?
a) To end the conditional structure
b) To specify an alternate condition
c) To execute the code block unconditionally
d) To skip the current iteration
Answer: b) To specify an alternate condition
Q. 46
What is the term for a program that translates source code written by a programmer into machine code that a computer can execute?
a) Interpreter
b) Compiler
c) Debugger
d) Linker
Answer: b) Compiler
Q. 47
In programming, what is a “syntax error”?
a) An error that occurs when a program runs out of memory
b) An error that occurs when the program logic is incorrect
c) An error that occurs due to a violation of the programming language’s rules for structure and format
d) An error that occurs when a program crashes
Answer: c) An error that occurs due to a violation of the programming language’s rules for structure and format
Q. 48
Which of the following is an example of a unary operator in programming?
a) +
b) –
c) *
d) /
Answer: b) –
Q. 49
What is the purpose of the “if-else” statement in programming?
a) To create loops
b) To define variables
c) To control the flow of a program based on a condition
d) To declare functions
Answer: c) To control the flow of a program based on a condition
Q. 50
What is the primary purpose of a “while” loop in programming?
a) To perform a specific task a fixed number of times
b) To execute a block of code repeatedly as long as a condition is true
c) To define a function
d) To terminate a program
Answer: b) To execute a block of code repeatedly as long as a condition is true
Q. 51
In programming, what does the term “variable scope” refer to?
a) The physical location in memory where variables are stored
b) The range or context in which a variable can be accessed and modified
c) The data type of a variable
d) The process of declaring a variable
Answer: b) The range or context in which a variable can be accessed and modified
Q. 52
What is the primary role of the “return” statement in a function?
a) To specify the function’s name
b) To indicate the function’s return type
c) To terminate the program
d) To send a value back to the calling code
Answer: d) To send a value back to the calling code
Q. 53
Which of the following is a common data structure used to represent hierarchical data?
a) Queue
b) Stack
c) Tree
d) Set
Answer: c) Tree
Q. 54
In programming, what is a “class”?
a) A data type
b) A block of code that performs a specific task
c) A template for creating objects with shared attributes and behaviors
Q. 27
What is the primary purpose of a comment in code?
a) To confuse other programmers
b) To provide documentation and explanations
c) To execute a specific task
d) To create variables
Answer: b) To provide documentation and explanations
Q. 28
What is the term for a programming error that occurs at runtime and causes a program to terminate abruptly?
a) Syntax error
b) Compilation error
c) Logic error
d) Runtime error
Answer: d) Runtime error
Q. 29
Which data structure stores elements in a first-in, first-out (FIFO) order?
a) Stack
b) Queue
c) Linked List
d) Array
Answer: b) Queue
Q. 30
What is the primary purpose of a function’s return statement in programming?
a) To terminate the program
b) To specify the input parameters
c) To indicate the function’s name
d) To return a value to the calling code
Answer: d) To return a value to the calling code
Q. 31
What is the term for the process of finding and fixing errors in a program?
a) Debugging
b) Compiling
c) Executing
d) Commenting
Answer: a) Debugging
Q. 32
In object-oriented programming, what is polymorphism?
a) The ability of an object to take on multiple forms
b) The process of creating new objects
c) The use of multiple inheritance
d) The process of encapsulating data
Answer: a) The ability of an object to take on multiple forms
Q. 33
Which type of programming language allows the programmer to specify what needs to be done rather than how to do it?
a) Procedural programming language
b) Declarative programming language
c) Object-oriented programming language
d) Functional programming language
Answer: b) Declarative programming language
Q. 34
What is the term for a named storage location in a program that holds data?
a) Data structure
b) Function
c) Variable
d) Statement
Answer: c) Variable
Q. 35
What does the term “syntax” refer to in programming?
a) The set of rules that dictate the structure of valid program statements
b) A programming language’s ability to execute code
c) The process of debugging code
d) The user interface design
Answer: a) The set of rules that dictate the structure of valid program statements
Q. 36
In programming, what does the “break” statement typically do within a loop?
a) Skips the current iteration and continues with the next
b) Ends the loop and continues with the code after the loop
c) Repeats the current iteration
d) Creates an infinite loop
Answer: b) Ends the loop and continues with the code after the loop
Q. 37
What is the purpose of a function’s parameters in programming?
a) To store the function’s local variables
b) To specify the function’s name
c) To receive input values when the function is called
d) To define the function’s return type
Answer: c) To receive input values when the function is called
Q. 38
Which programming concept involves breaking a complex problem into smaller, manageable parts?
a) Abstraction
b) Encapsulation
c) Decomposition
d) Polymorphism
Answer: c) Decomposition
Q. 39
What is the primary advantage of using object-oriented programming (OOP)?
a) Faster program execution
b) Reduced memory usage
c) Enhanced code organization and reusability
d) Simplicity in syntax
Answer: c) Enhanced code organization and reusability
Q. 40
Which programming construct allows you to make decisions based on a condition?
a) Loop
b) Function
c) Class
d) Conditional statement
Answer: d) Conditional statement
Q. 41
In programming, what is a “method”?
a) A type of variable
b) A block of code that performs a specific task
c) A loop construct
d) A comment within the code
Answer: b) A block of code that performs a specific task
a) Integer
b) Boolean
c) String
d) Loop
Answer: d) Loop
Q. 11
What is the purpose of a loop in programming?
a) To store data
b) To execute a block of code repeatedly
c) To declare variables
d) To display output
Answer: b) To execute a block of code repeatedly
Q. 12
In object-oriented programming, what is encapsulation?
a) The process of converting source code to machine code
b) The bundling of data and methods that operate on that data
c) The process of debugging code
d) The creation of user interfaces
Answer: b) The bundling of data and methods that operate on that data
Q. 13
What does the acronym “API” stand for in programming?
a) Advanced Programming Interface
b) Application Programming Interface
c) Automated Program Instruction
d) Application Program Installation
Answer: b) Application Programming Interface
Q. 14
In programming, what is an algorithm?
a) A type of data structure
b) A set of instructions for solving a specific problem
c) A programming language
d) A hardware component
Answer: b) A set of instructions for solving a specific problem
Q. 15
Which of the following is an example of a relational operator in programming?
a) if
b) +
c) >
d) for
Answer: c) >
Q. 16
What is the purpose of version control systems like Git?
a) To write code
b) To compile code
c) To manage and track changes in source code
d) To execute code
Answer: c) To manage and track changes in source code
Q. 17
What is the primary benefit of using functions or methods in programming?
a) They make code shorter
b) They eliminate the need for conditional statements
c) They promote code reusability and modularity
d) They improve code execution speed
Answer: c) They promote code reusability and modularity
Q. 18
Which data structure allows you to store a collection of elements with unique values?
a) Array
b) Linked List
c) Set
d) Queue
Answer: c) Set
Q. 19
In object-oriented programming, what is inheritance?
a) The process of creating objects
b) The process of overriding a method
c) The process of acquiring properties and behaviors from a parent class
d) The process of debugging code
Answer: c) The process of acquiring properties and behaviors from a parent class
Q. 20
What is the purpose of exception handling in programming?
a) To create exceptions intentionally
b) To prevent code from running
c) To handle errors and unexpected situations gracefully
d) To improve code readability
Answer: c) To handle errors and unexpected situations gracefully
Q. 21
Which of the following is an example of a dynamic programming language?
a) C
b) C++
c) Java
d) JavaScript
Answer: d) JavaScript
Q. 22
What is the term for a set of rules that dictate how data is organized and stored in a computer’s memory?
a) Syntax
b) Algorithm
c) Data structure
d) Binary code
Answer: c) Data structure
Q. 23
What is a loop that continues to execute indefinitely until a specified condition is met called?
a) For loop
b) While loop
c) Infinite loop
d) Conditional loop
Answer: c) Infinite loop
Q. 24
In the context of programming, what is a “bug”?
a) A type of data structure
b) An insect that affects computers
c) An error or flaw in the code
d) A debugging tool
Answer: c) An error or flaw in the code
Q. 25
What is the purpose of a variable in programming?
a) To store and manipulate data
b) To create user interfaces
c) To define conditional statements
d) To write comments in the code
Answer: a) To store and manipulate data
Q. 26
Which of the following is an example of an imperative programming language?
a) Python
b) SQL
c) Haskell
d) Ruby
Answer: a) Python
Q. 46
What is the term for a program that translates source code written by a programmer into machine code that a computer can execute?
a) Interpreter
b) Compiler
c) Debugger
d) Linker
Answer: b) Compiler
Q. 47
In programming, what is a “syntax error”?
a) An error that occurs when a program runs out of memory
b) An error that occurs when the program logic is incorrect
c) An error that occurs due to a violation of the programming language’s rules for structure and format
d) An error that occurs when a program crashes
Answer: c) An error that occurs due to a violation of the programming language’s rules for structure and format
Q. 48
Which of the following is an example of a unary operator in programming?
a) +
b) –
c) *
d) /
Answer: b) –
Q. 49
What is the purpose of the “if-else” statement in programming?
a) To create loops
b) To define variables
c) To control the flow of a program based on a condition
d) To declare functions
Answer: c) To control the flow of a program based on a condition
Q. 50
What is the primary purpose of a “while” loop in programming?
a) To perform a specific task a fixed number of times
b) To execute a block of code repeatedly as long as a condition is true
c) To define a function
d) To terminate a program
Answer: b) To execute a block of code repeatedly as long as a condition is true
Curriculum
Exit Exam for Computer Science-Advanced
System Development
0/4
Programming and Algorithms
0/4
Computer Programming-adv

Text lesson
Object Oriented Programming-adv

Text lesson
Design and Analysis of Algorithms-adv

Text lesson
Data Structure and Algorithms-adv

Text lesson
Computer Networking and Security
0/3
Intelligent Systems
0/1
Computer Architecture and Operating Systems
0/2
Compiler and Complexity
0/2
Mock Test
0/2
Text lesson
Computer Programming-adv
Q. 1
What is the primary purpose of a programming language?
a) To communicate with computers
b) To create beautiful websites
c) To design user interfaces
d) To play video games
Answer: a) To communicate with computers
Q. 2
Which of the following is NOT a high-level programming language?
a) Python
b) C++
c) Assembly
d) Java
Answer: c) Assembly
Q. 3
What is the role of a compiler in the software development process?
a) Executes the program
b) Converts source code to machine code
c) Debugs the code
d) Generates user documentation
Answer: b) Converts source code to machine code
Q. 4
Which programming paradigm focuses on breaking down a program into smaller, reusable functions or methods?
a) Object-Oriented Programming (OOP)
b) Procedural Programming
c) Functional Programming
d) Event-Driven Programming
Answer: b) Procedural Programming
Q. 5
What does “DRY” stand for in the context of programming best practices?
a) Don’t Repeat Yourself
b) Do Right Yourself
c) Do It Right, Yesterday
d) Develop, Run, Yield
Answer: a) Don’t Repeat Yourself
Q. 6
In Python, what is the keyword used to define a function?
a) def
b) function
c) func
d) define
Answer: a) def
Q. 7
Which data structure follows the “Last In, First Out” (LIFO) principle?
a) Queue
b) Stack
c) Array
d) Linked List
Answer: b) Stack
Q. 8
What is the purpose of conditional statements in programming?
a) To control the flow of a program
b) To create loops
c) To define data structures
d) To format output
Answer: a) To control the flow of a program
Q. 9
What is the term for a variable that can be accessed from any part of a program?
a) Local variable
b) Global variable
c) Static variable
d) Dynamic variable
Answer: b) Global variable
Q. 10
Which of the following is NOT a valid primitive data type in most programming languages?
متاح الآن! بحث تيليغرام 2025 — أهم رؤى العام 
