Exit Exam Part 1

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/1076

flashcard set

Earn XP

Description and Tags

A comprehensive flashcard set of the 15 courses on the exit exam.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

1077 Terms

1
New cards
What is programming and what are its primary objectives?
Programming is the process of creating software, applications, and computer programs. Its primary objectives are to solve problems, automate tasks, and develop new technologies.
2
New cards
What is a data type and why is it important in programming?
A data type is a category of data that determines the type of operations that can be performed on it. It is important in programming because it helps to ensure that data is used and manipulated correctly.
3
New cards
What are the different types of data types in programming?
The different types of data types in programming include primitive types, composite types, and abstract data types.
4
New cards
What is a variable and how is it used in programming?
A variable is a named memory location that can hold a value. It is used in programming to store and manipulate data.
5
New cards
What are the rules for naming variables in programming?
The rules for naming variables in programming are: they must start with a letter or underscore, they can contain letters, numbers, or underscores, they cannot contain spaces, and they cannot be a reserved keyword.
6
New cards
How do you declare a variable in programming?
You declare a variable in programming by specifying the data type, followed by the variable name and an optional initial value.
7
New cards
What is an expression and how is it evaluated in programming?
An expression is a combination of values, variables, and operators that can be evaluated to produce a result. It is evaluated in programming by applying the operator precedence and associativity rules.
8
New cards
What are the different types of expressions in programming?
The different types of expressions in programming include arithmetic expressions, relational expressions, logical expressions, and conditional expressions.
9
New cards
How do you perform arithmetic operations in programming?
You perform arithmetic operations in programming using arithmetic operators such as +, -, *, /, and %.
10
New cards
What are the common comparison operators used in programming?
The common comparison operators used in programming include \==, !\=, \>,
11
New cards
What is a conditional statement and how is it used in programming?
A conditional statement is a statement that performs a specific action depending on whether a condition is true or false. It is used in programming to control the flow of execution based on different conditions.
12
New cards
What are the different types of loops used in programming?
The different types of loops used in programming include for loops, while loops, do-while loops, and foreach loops.
13
New cards
What is the syntax for a while loop in programming?
The syntax for a while loop in programming is: while (condition) { code to execute while condition is true }
14
New cards
What is the syntax for a for loop in programming?
The syntax for a for loop in programming is: for (initialization; condition; increment/decrement) { code to execute while condition is true }
15
New cards
How do you use a loop to iterate over an array in programming?
You use a loop to iterate over an array in programming by using the index of the array as the loop counter variable.
16
New cards
What is the difference between a while loop and a do-while loop in programming?
The difference between a while loop and a do-while loop in programming is that a while loop tests the condition at the beginning of the loop, while a do-while loop tests the condition at the end of the loop.
17
New cards
What is a nested loop and how is it used in programming?
A nested loop is a loop that is placed inside another loop. It is used in programming to iterate over multidimensional arrays and to perform complex calculations.
18
New cards
How do you break out of a loop in programming?
You break out of a loop in programming using the break statement.
19
New cards
What is the purpose of a continue statement in programming?
The purpose of the continue statement in programming is to skip the current iteration of a loop and move on to the next iteration.
20
New cards
How do you create a function in programming?
In programming, a function can be created by using the function keyword followed by the function name and the code block that defines the function.
21
New cards
What are the different types of parameters that can be passed to a function in programming?
The different types of parameters that can be passed to a function in programming are:
▪ Required parameters
▪ Default parameters
▪ Variable-length parameters
▪ Keyword parameters
22
New cards
How do you call a function in programming?
In programming, a function can be called by using its name followed by the argument list inside parentheses.
23
New cards
What is a return statement in programming and how is it used?
In programming, a return statement is used to return a value from a function. It can be used to exit a function and return a value to the caller.
24
New cards
How do you debug a program in programming?
In programming, a program can be debugged by using a debugger tool, printing out values at various points in the code, and systematically isolating the error by testing smaller portions of the code.
25
New cards
What are some common errors encountered in programming and how can they be resolved?
Some common errors encountered in programming include syntax errors, logical errors, and runtime errors. Syntax errors can be resolved by checking the syntax of the code. Logical errors can be resolved by analyzing the code and checking for errors in the logic. Runtime errors can be resolved by using error handling techniques and debugging tools to find and fix the error.
26
New cards
What is the output of the following code? makefile x \= 5
y \= 3
print(x + y)
8
27
New cards
What is the purpose of a comment in programming?
A comment is used to add notes to the code to explain what it does or to make it more readable to others.
28
New cards
What is the difference between a float and an integer data type?
A float is a data type that represents a number with a decimal point while an integer represents a whole number without a decimal point.
29
New cards
What is the difference between a while loop and a for loop?
A while loop executes as long as the specified condition is true, while a for loop executes a fixed number of times.
30
New cards
What is recursion in programming?
Recursion is a programming technique where a function calls itself to solve a problem.
31
New cards
What is the difference between a function and a method?
A function is a standalone piece of code that performs a specific task, while a method is a function that belongs to an object or a class.
32
New cards
What is the difference between pass by value and pass by reference in programming?
Pass by value involves passing a copy of a variable's value to a function, while pass by reference involves passing a reference to the memory location of the variable.
33
New cards
How does the scope of a variable affect its accessibility in a program?
The scope of a variable determines where it can be accessed in a program. Variables with global scope can be accessed from anywhere in the program, while variables with local scope can only be accessed within the function or block in which they are defined.
34
New cards
What is object-oriented programming and how does it differ from procedural programming?
Object-oriented programming (OOP) is a programming paradigm that uses objects to represent data and methods to represent actions that can be performed on that data. OOP differs from procedural programming, which focuses on writing procedures or functions that manipulate data.
35
New cards
How can you optimize the performance of a program that uses loops to process large datasets?
There are several ways to optimize the performance of a program that uses loops to process large datasets, such as minimizing the number of iterations in the loop, using efficient data structures, and parallelizing the loop to take advantage of multiple cores.
36
New cards
What is a data structure and why is it important in programming?
A data structure is a way of organizing and storing data in a computer so that it can be accessed and manipulated efficiently. Data structures are important in programming because they enable efficient data access, retrieval, and modification, which is essential for many algorithms and appl
37
New cards
What is a database?
An organized collection of data.
38
New cards
What is the importance of a database?
To provide efficient storage and retrieval of data.
39
New cards
What are the different types of databases?
Relational, NoSQL, object-oriented, etc.
40
New cards
What are the components of a database?
Data, schema, DBMS, users, and hardware.
41
New cards
What are some advantages of using a database?
Data consistency, security, and scalability.
42
New cards
What are some disadvantages of using a database?
Complexity, cost, and maintenance.
43
New cards
What is ER modeling?
A graphical representation of entities and relationships used to design and understand the structure of a database.
44
New cards
What is the purpose of ER modeling?
To design and understand the structure of a database.
45
New cards
What are entities in ER modeling?
Objects with distinct properties.
46
New cards
What are attributes in ER modeling?
Characteristics of entities.
47
New cards
What are relationships in ER modeling?
Connections between entities.
48
New cards
What is cardinality in ER modeling?
The number of entities involved in a relationship.
49
New cards
What are ER diagrams?
A visual representation of entities and relationships.
50
New cards
What is relational algebra?
A mathematical operation used for manipulating and retrieving data from relational databases.
51
New cards
What is the purpose of relational algebra?
To manipulate and retrieve data from databases.
52
New cards
What are the basic operations in relational algebra?
Selection, projection, union, intersection, difference, and Cartesian product.
53
New cards
What is selection in relational algebra?
Filtering data based on a condition.
54
New cards
What is projection in relational algebra?
Selecting specific attributes from a relation.
55
New cards
What is union in relational algebra?
Combining data from two relations, keeping only distinct tuples.
56
New cards
What is intersection in relational algebra?
Combining data from two relations, keeping only common tuples.
57
New cards
What is difference in relational algebra?
Finding tuples that are in one relation but not the other.
58
New cards
What is Cartesian product in relational algebra?
Combining data from two relations, creating all possible pairs.
59
New cards
What are join operations in relational algebra?
Inner join, outer join, and natural join.
60
New cards
What is inner join in relational algebra?
Combining data from two relations, keeping only the common tuples.
61
New cards
What is outer join in relational algebra?
Combining data from two relations, keeping all tuples from one relation and matching tuples from the other relation.
62
New cards
What is natural join in relational algebra?
Combining data from two relations, keeping only the common tuples and eliminating the duplicate columns.
63
New cards
What is division operation in relational algebra?
Retrieving data that matches a set of conditions.
64
New cards
What is a primary key in a database?
A unique identifier for a row in a table.
65
New cards
What is a foreign key in a database?
A key in one table that refers to the primary key of another table.
66
New cards
What is normalization in a database?
The process of organizing data in a database to minimize redundancy and dependency.
67
New cards
What is denormalization in a database?
The process of adding redundant data to a database to improve performance.
68
New cards
What is a transaction in a database?
A unit of work performed by a user that involves one or more database operations.
69
New cards
What is a rollback in a database?
Undoing the changes made in a transaction.
70
New cards
What is a commit in a database?
Saving the changes made in a transaction.
71
New cards
What is the purpose of ER modeling?
The purpose of ER modeling is to design and understand database structure.
72
New cards
What are the components of an ER diagram?
The components of an ER diagram are entities, attributes, and relationships.
73
New cards
What is the difference between a left outer join and a right outer join?
A left outer join returns all the rows from the left table and matching rows from the right table, while a right outer join returns all the rows from the right table and matching rows from the left table.
74
New cards
What is the purpose of the selection operation in relational algebra?
The purpose of the selection operation is to filter data based on a condition.
75
New cards
What is the difference between a NoSQL database and a relational database?
A NoSQL database is a non-relational database that does not use a fixed schema, while a relational database is a structured database that uses tables with predefined relationships between them.
76
New cards
What is a Cartesian product in relational algebra?
A Cartesian product is a binary operation that returns a table containing all possible combinations of rows from two input tables.
77
New cards
What is Object-Oriented Programming (OOP)?
OOP is a programming paradigm that focuses on objects and their interactions.
78
New cards
What are the four main concepts of OOP?
Encapsulation, abstraction, inheritance, and polymorphism.
79
New cards
What is a class?
A class is a blueprint for creating objects.
80
New cards
What is an object?
An object is an instance of a class.
81
New cards
What are the properties of a class?
The properties of a class are the variables that define the object's state.
82
New cards
What are the methods of a class?
The methods of a class are the functions that define the object's behavior.
83
New cards
What is encapsulation?
Encapsulation is the practice of hiding the internal details of an object from the outside world.
84
New cards
How is encapsulation achieved?
Encapsulation is achieved through access modifiers such as public, private, and protected.
85
New cards
What is abstraction?
Abstraction is the practice of simplifying complex systems by breaking them down into smaller, more manageable parts.
86
New cards
How is abstraction achieved?
Abstraction is achieved through abstract classes and interfaces.
87
New cards
What is inheritance?
Inheritance is the process by which one class inherits the properties and methods of another class.
88
New cards
What is a base class?
A base class is the class that is being inherited from.
89
New cards
What is a derived class?
A derived class is the class that is inheriting.
90
New cards
What are the types of inheritance?
Single inheritance, multiple inheritance, and hierarchical inheritance.
91
New cards
What is polymorphism?
Polymorphism is the ability of an object to take on many forms.
92
New cards
How is polymorphism achieved?
Polymorphism is achieved through method overriding and method overloading.
93
New cards
What is method overriding?
Method overriding is the process of replacing a method in the base class with a new implementation in the derived class.
94
New cards
What is method overloading?
Method overloading is the process of creating multiple methods with the same name but different parameters.
95
New cards
What are virtual functions?
Virtual functions are functions that are declared in a base class and can be overridden in a derived class.
96
New cards
What are abstract classes?
Abstract classes are classes that cannot be instantiated and contain one or more abstract methods.
97
New cards
What are interfaces?
Interfaces are similar to abstract classes but they only contain abstract methods and no implementation.
98
New cards
What is a constructor?
A constructor is a special method that is called when an object is created.
99
New cards
What is the purpose of a constructor?
The purpose of a constructor is to initialize the object's state.
100
New cards
What is a destructor?
A destructor is a special method that is called when an object is destroyed.