CompTIA Tech+ FC0-U71 Practice Test Questions and Exam Dumps Part7 Q121-140

View Full CompTIA Tech+ FC0-U71 Exam Dumps and Practice Test Dumps

 

Question 121.

Which programming concept describes a named value that is not intended to change while a program runs?

  1. Variable
    2. Constant
    3. Loop
    4. Array

Correct Answer: 2. Constant

Explanation:

A constant is a named value intended to remain unchanged after it is defined. Constants are useful for values such as fixed conversion factors, configuration limits, or mathematical values that should not be modified accidentally. Variables, in contrast, can change while a program executes. Loops repeat instructions, while arrays store multiple related values. Using constants can make code easier to understand and maintain because important fixed values have meaningful names instead of appearing repeatedly as unexplained numbers or strings.

Question 122.

Which type of operator is used to perform calculations such as addition, subtraction, multiplication, and division?

  1. Arithmetic operator
    2. Logical operator only
    3. Comparison operator only
    4. Assignment operator only

Correct Answer: 1. Arithmetic operator

Explanation:

Arithmetic operators are used to perform mathematical calculations. Common examples include addition, subtraction, multiplication, division, and sometimes modulus. Comparison operators evaluate relationships such as equality or greater-than, while logical operators combine Boolean conditions. Assignment operators place values into variables. Arithmetic operations are fundamental to programming because applications often need to calculate totals, averages, measurements, percentages, and many other numerical results.

Question 123.

Which operator type is commonly used to determine whether one value is greater than another?

  1. Assignment operator
    2. Arithmetic operator
    3. Comparison operator
    4. Concatenation operator

Correct Answer: 3. Comparison operator

Explanation:

Comparison operators evaluate relationships between values, such as equal to, not equal to, greater than, or less than. The result of a comparison is often a Boolean value that can be used by a conditional statement. Assignment operators store values, arithmetic operators perform calculations, and concatenation operators combine text. Comparison logic is fundamental to decision-making in programs because software frequently needs to evaluate conditions before choosing what action to perform next.

Question 124.

Which programming structure is most appropriate when one of several different actions must be selected based on a value?

  1. Comment
    2. Variable only
    3. Array only
    4. Conditional or selection structure**

Correct Answer: 4. Conditional or selection structure

Explanation:

Conditional or selection structures allow a program to choose among different actions based on evaluated values or conditions. Examples include if/else statements and switch or case structures. These constructs make software responsive to user input, calculated results, or changing system conditions. Variables and arrays hold data, while comments document code. Without conditional logic, a program would have difficulty making meaningful decisions or changing its behavior based on circumstances.

Question 125.

Which programming error occurs when code violates the grammatical rules of the programming language?

  1. Syntax error
    2. Logic error
    3. Hardware failure
    4. Backup failure

Correct Answer: 1. Syntax error

Explanation:

A syntax error occurs when source code does not follow the required grammar of the programming language. Examples include missing punctuation, incorrectly structured statements, or misspelled keywords. Many compilers and interpreters identify syntax errors before the program can run. Logic errors are different because the code may execute successfully but produce an incorrect result. Understanding the difference between syntax and logic problems helps developers troubleshoot code more efficiently.

Question 126.

Which error allows a program to run but causes it to produce an incorrect result?

  1. Syntax error
    2. Logic error
    3. Power failure
    4. File permission only

Correct Answer: 2. Logic error

Explanation:

A logic error occurs when a program executes but the instructions do not produce the intended result. For example, a formula may use the wrong operator or a condition may test the wrong value. Syntax errors usually prevent code from running correctly in the first place, while logic errors can be harder to detect because the program may appear normal. Testing, debugging, and careful review of expected versus actual results help identify logic problems.

Question 127.

Which software development practice records changes to source code over time and supports collaboration among developers?

  1. Disk cleanup
    2. File compression
    3. Version control
    4. Formatting

Correct Answer: 3. Version control

Explanation:

Version control systems track changes to source code and other project files over time. They allow developers to review history, compare revisions, restore earlier versions, and work on changes collaboratively. Modern version control systems also support branches and merging, which helps teams develop features independently. Disk cleanup, compression, and formatting serve unrelated purposes. Version control is important because software projects often change continuously and require a reliable record of who changed what and when.

Question 128.

Which term describes a step-by-step set of instructions for solving a problem?

  1. Database
    2. Variable
    3. Comment
    4. Algorithm**

Correct Answer: 4. Algorithm

Explanation:

An algorithm is a defined sequence of steps used to solve a problem or perform a task. Algorithms can be expressed in natural language, pseudocode, flowcharts, or actual programming code. They are fundamental to software development because programmers need clear processes for transforming input into desired output. Variables store values, databases organize data, and comments document code. A good algorithm should be understandable, logically correct, and appropriate for the problem being solved.

Question 129.

Which diagram uses standardized symbols and arrows to represent the flow of a process or algorithm?

  1. Flowchart
    2. Spreadsheet
    3. Database table
    4. Packet capture

Correct Answer: 1. Flowchart

Explanation:

A flowchart visually represents the sequence and decision points within a process or algorithm. Common symbols indicate actions, inputs, outputs, and decisions, while arrows show the direction of flow. Flowcharts are useful during planning because they help developers and non-developers understand complex processes before code is written. Spreadsheets, database tables, and packet captures serve different purposes. Flowcharts can also help reveal missing steps, unnecessary complexity, or incorrect decision paths.

Question 130.

Which plain-language programming representation is used to describe logic without requiring the exact syntax of a real programming language?

  1. Machine code
    2. Pseudocode
    3. Binary file
    4. Database schema

Correct Answer: 2. Pseudocode

Explanation:

Pseudocode describes program logic using structured, human-readable statements without requiring the exact rules of a programming language. It is useful when planning algorithms because developers can focus on logic rather than syntax. Pseudocode can later be translated into languages such as Python, Java, or C#. Machine code is directly executable by a processor, while a database schema defines data structures. Pseudocode is particularly useful for teaching, design discussions, and documenting complex logic.

Question 131.

Which database operation retrieves selected information without necessarily changing the stored data?

  1. Delete
    2. Insert
    3. Query
    4. Format

Correct Answer: 3. Query

Explanation:

A query requests information from a database. For example, a query might return all customers in a particular city or all orders placed during a specific date range. Queries can filter, sort, combine, and summarize data. Insert and delete operations change stored data, while formatting is not a standard database operation in this context. Understanding queries is fundamental because users and applications often need to retrieve only a relevant subset of the information stored in a database.

Question 132.

Which database relationship occurs when one record in one table can be associated with many records in another table?

  1. One-to-one only
    2. No relationship
    3. Many-to-none
    4. One-to-many**

Correct Answer: 4. One-to-many

Explanation:

A one-to-many relationship exists when one record in one table can correspond to several records in another table. For example, one customer may have many orders. The customer table may use a primary key, while the order table contains a foreign key referencing that customer. Relational databases use such relationships to reduce unnecessary duplication and organize information logically. Understanding common relationship types helps users interpret structured database designs.

Question 133.

Which database key is commonly used to reference the primary key of another table?

  1. Foreign key
    2. Duplicate key
    3. Display key
    4. Temporary key only

Correct Answer: 1. Foreign key

Explanation:

A foreign key is a field in one table that references a primary key or other unique key in another table. It helps create relationships between tables and supports referential integrity. For example, an Orders table may contain CustomerID as a foreign key pointing to the Customers table. Primary keys uniquely identify records in their own table. Foreign keys help relational databases connect related information without storing all details repeatedly.

Question 134.

Which database design goal reduces unnecessary duplicate data across tables?

  1. File compression
    2. Normalization
    3. Encryption
    4. Virtualization

Correct Answer: 2. Normalization

Explanation:

Database normalization organizes data into appropriate tables and relationships to reduce unnecessary duplication and improve consistency. For example, customer details can be stored once in a Customers table rather than repeated in every Order record. Proper normalization can make updates safer because information changes in one place instead of many. Compression, encryption, and virtualization are unrelated concepts. Highly normalized designs may sometimes be adjusted for performance, but normalization remains a fundamental relational database principle.

Question 135.

Which SQL operation is primarily used to add a new record to a database table?

  1. SELECT
    2. DELETE
    3. INSERT
    4. DROP

Correct Answer: 3. INSERT

Explanation:

The SQL INSERT operation adds new data to a table. SELECT retrieves data, DELETE removes records, and DROP can remove database objects such as tables. INSERT statements typically specify a target table and the values that should be stored in one or more fields. Applications often generate INSERT statements behind the scenes when users create new records through forms or other interfaces.

Question 136.

Which SQL operation is primarily used to retrieve records from a relational database?

  1. INSERT
    2. UPDATE
    3. DELETE
    4. SELECT**

Correct Answer: 4. SELECT

Explanation:

SELECT is the SQL command most commonly used to retrieve data from one or more tables. It can be combined with filters, sorting, joins, and aggregation to return only the information needed. INSERT adds records, UPDATE changes existing values, and DELETE removes records. SELECT queries are fundamental to relational database use because applications frequently need to display or analyze stored information without modifying it.

Question 137.

Which SQL operation changes existing values in records that already exist?

  1. UPDATE
    2. SELECT
    3. INSERT
    4. CREATE

Correct Answer: 1. UPDATE

Explanation:

UPDATE modifies values in existing database records. It is commonly combined with a condition that identifies which rows should be changed. SELECT retrieves information, INSERT creates new records, and CREATE is used to define database objects such as tables. Careless UPDATE statements can modify more records than intended, so conditions should be reviewed carefully. Database permissions and backups also help reduce the impact of accidental changes.

Question 138.

Which SQL operation removes selected records from a table?

  1. SELECT
    2. DELETE
    3. INSERT
    4. JOIN

Correct Answer: 2. DELETE

Explanation:

DELETE removes records from a relational database table. A condition is often used to determine exactly which rows should be removed. Without an appropriate condition, a DELETE operation may remove many or all records in a table. SELECT retrieves records, INSERT adds records, and JOIN combines related data from multiple tables in query results. Access controls, backups, and careful query review are important when performing destructive database operations.

Question 139.

Which data-protection concept ensures that information is accessible only to authorized people or systems?

  1. Availability
    2. Integrity
    3. Confidentiality
    4. Redundancy

Correct Answer: 3. Confidentiality

Explanation:

Confidentiality means protecting information from unauthorized disclosure. Controls that support confidentiality include encryption, access permissions, strong authentication, and physical security. Integrity focuses on preventing unauthorized or accidental modification, while availability ensures that systems and data are accessible when needed. Together, confidentiality, integrity, and availability form a widely used model for understanding information security objectives.

Question 140.

Which security objective focuses on ensuring that data has not been changed improperly?

  1. Confidentiality
    2. Availability
    3. Scalability
    4. Integrity**

Correct Answer: 4. Integrity

Explanation:

Integrity means maintaining the accuracy, completeness, and trustworthiness of data. Security controls should prevent unauthorized changes and help detect accidental or malicious modification. Hashing, permissions, digital signatures, version control, and logging can contribute to integrity. Confidentiality protects against unauthorized disclosure, while availability focuses on keeping information and services accessible. Understanding these security objectives helps organizations select controls based on what they are trying to protect.