Bcse102 Exam Multi-choice Part 3

Approved & Edited by ProProfs Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Rowanwd
R
Rowanwd
Community Contributor
Quizzes Created: 4 | Total Attempts: 281
Questions: 15 | Attempts: 82

SettingsSettingsSettings
Bcse102 Exam Multi-choice Part 3 - Quiz

Questions 31-45 of the multi-choice exam section


Questions and Answers
  • 1. 

    A good mnemonic name generally speaks to the __________.  

    • A.

      Problem

    • B.

      Some aspect of computing

    • C.

      how more than what

    • D.

      Solution

    Correct Answer
    A. Problem
    Explanation
    A good mnemonic name generally speaks to the problem. This means that a well-chosen mnemonic name should clearly indicate or describe the problem that it is intended to help remember or recall. It should be specific and relevant to the problem at hand, making it easier for the user to associate the name with the problem and remember it when needed.

    Rate this question:

  • 2. 

    If you modify a name with a computer-value qualifier like Total, Sum, Average, Max, Min, put the modifier at the __________ of the name.  

    • A.

      Middle

    • B.

      End

    • C.

      Beginning

    • D.

      Most readable place

    Correct Answer
    B. End
    Explanation
    When modifying a name with a computer-value qualifier like Total, Sum, Average, Max, Min, it is most appropriate to put the modifier at the end of the name. This is because it makes the name more descriptive and easier to understand. Placing the modifier at the end helps to clearly indicate the purpose or nature of the variable, making the code more readable and reducing the chances of confusion or errors.

    Rate this question:

  • 3. 

    Loop index variables are best named __________.  

    • A.

      Flag

    • B.

      Temp

    • C.

      I, j or k

    • D.

      Count

    Correct Answer
    D. Count
    Explanation
    Loop index variables are typically best named "count" because they are commonly used to keep track of the number of iterations or the current position in a loop. Using a descriptive name like "count" helps to make the code more readable and understandable. Other options like "flag" or "temp" may not accurately convey the purpose of the variable, while using single-letter variables like "i", "j", or "k" can make the code harder to follow and understand.

    Rate this question:

  • 4. 

    According to McConnell, the most common problems with arrays is __________?  

    • A.

      attempting to access values in non-sequential order

    • B.

      Attempting to access an element which is out of bounds

    • C.

      Attempting to store data which is too big

    • D.

      Storing the wrong type of value

    Correct Answer
    B. Attempting to access an element which is out of bounds
    Explanation
    The most common problem with arrays, according to McConnell, is attempting to access an element which is out of bounds. This means trying to access an index that does not exist in the array, either because it is negative or exceeds the array's length. This can lead to errors and unexpected behavior in the program.

    Rate this question:

  • 5. 

    Localization is __________.  

    • A.

      Another word for internationalization

    • B.

      The grouping of strings together in a program

    • C.

      The use of named constants in a program

    • D.

      The finding of a particular string in a program

    Correct Answer
    A. Another word for internationalization
    Explanation
    Localization refers to the process of adapting a product or service to a specific language, culture, and region. It involves translating and adapting content, such as text, images, and user interfaces, to suit the preferences and requirements of a target market. Internationalization, on the other hand, focuses on designing and developing a product or service in a way that allows for easy localization. Therefore, the correct answer suggests that localization is another term used to describe the broader concept of internationalization.

    Rate this question:

  • 6. 

    Magic numbers are __________.  

    • A.

      Literal numbers inside program that can be changed easily

    • B.

      The numbers 7, 42 and 666

    • C.

      Literal numbers inside program that appear without explanation

    • D.

      Hard coded 0s and 1s

    Correct Answer
    C. Literal numbers inside program that appear without explanation
    Explanation
    Magic numbers are literal numbers inside a program that appear without explanation. These numbers are often used directly in the code without any clear indication of their purpose or meaning. This can make the code difficult to understand and maintain, as it lacks clarity and context. It is generally considered a best practice to avoid using magic numbers and instead use named constants or variables to improve code readability and maintainability.

    Rate this question:

  • 7. 

    Access routines __________.  

    • A.

      Are another name for .get routines

    • B.

      are another name for .set routines

    • C.

      do not hide data

    • D.

      Give you centralized access to data

    Correct Answer
    A. Are another name for .get routines
    Explanation
    Access routines are another name for .get routines. In programming, access routines are used to retrieve or access data from a class or object. These routines typically have the prefix "get" and are used to return the value of a private or protected variable. By using access routines, we can ensure that data encapsulation is maintained, as the actual data remains hidden and can only be accessed through these routines. Therefore, access routines and .get routines serve the same purpose of retrieving data from a class or object.

    Rate this question:

  • 8. 

    To reduce the risk from using global data __________.  

    • A.

      Use class variables

    • B.

      put all global data into an object and pass it to all routines

    • C.

      develop a naming convention that makes global data obvious

    • D.

      Comment carefully the correct use of each global

    Correct Answer
    C. develop a naming convention that makes global data obvious
    Explanation
    Developing a naming convention that makes global data obvious helps to reduce the risk from using global data. This means that by using clear and descriptive names for global variables, it becomes easier for developers to understand and manage them, reducing the chances of confusion or unintended misuse. This naming convention can help improve code readability and maintainability, making it easier to identify and address any potential risks associated with global data.

    Rate this question:

  • 9. 

    It can be useful to use global data for __________.  

    • A.

      to keep all access to the data at the same level of abstraction

    • B.

      Emulation of named constants

    • C.

      controlling access to data

    • D.

      Access routines

    Correct Answer
    B. Emulation of named constants
    Explanation
    Using global data for emulation of named constants can be useful in order to keep all access to the data at the same level of abstraction. By using global data, the constants can be easily accessed and used throughout the program without the need for repetitive code or multiple instances of the same constant. This helps to improve code readability and maintainability.

    Rate this question:

  • 10. 

    'Routine parameter' means __________.  

    • A.

      the information passed out of a routine

    • B.

      the method signature line of the routine

    • C.

      the name of the routine

    • D.

      The information passed into a routine

    Correct Answer
    D. The information passed into a routine
    Explanation
    A routine parameter refers to the information that is passed into a routine. It can be any value or variable that is provided to the routine when it is called. This allows the routine to perform operations using the provided information.

    Rate this question:

  • 11. 

    A program should be read in __________ order.  

    • A.

      Left to right

    • B.

      Top to bottom

    • C.

      Right to left

    • D.

      Bottom to top

    Correct Answer
    B. Top to bottom
    Explanation
    A program should be read in top to bottom order because programming languages are designed to be executed sequentially. The code is written in a logical order, with each line or block of code building upon the previous ones. Reading the program from top to bottom ensures that the instructions are executed in the intended order, allowing the program to function as intended.

    Rate this question:

  • 12. 

    Code which needs to be in a specific order contains __________.  

    • A.

      Dependencies

    • B.

      Redundancies

    • C.

      Parameters

    • D.

      Sequences

    Correct Answer
    A. Dependencies
    Explanation
    Code that needs to be in a specific order often contains dependencies. Dependencies refer to the relationships and requirements between different components or modules of the code. These dependencies determine the order in which the code should be executed to ensure that all the necessary dependencies are satisfied. By organizing the code based on dependencies, developers can ensure that the code runs smoothly and without any errors.

    Rate this question:

  • 13. 

    A conditional is a statement that __________.  

    • A.

      Causes a program to repeatedly execute a block of code

    • B.

      has additional optional keywords

    • C.

      Causes a program to execute code in sequence

    • D.

      Controls the execution of other statements

    Correct Answer
    D. Controls the execution of other statements
    Explanation
    A conditional is a statement that controls the execution of other statements. It allows the program to make decisions based on certain conditions. Depending on whether the condition is true or false, the program will execute different blocks of code or skip certain statements altogether. By using conditionals, programmers can create more flexible and dynamic programs that can adapt to different scenarios and user inputs.

    Rate this question:

  • 14. 

    An incorrect branch is most often caused by using __________.  

    • A.

      = instead of < and >

    • B.

      = instead of :=

    • C.

      < or > instead of =

    • D.

      = instead of

    Correct Answer
    C. < or > instead of =
    Explanation
    An incorrect branch is most often caused by using < or > instead of =. This is because < and > are comparison operators used to check if one value is less than or greater than another value, whereas = is the assignment operator used to assign a value to a variable. Therefore, using < or > instead of = in a branch condition can lead to incorrect logic and potentially unexpected results.

    Rate this question:

  • 15. 

    How many elseif clauses can be put in conditional code?  

    • A.

      up to 2

    • B.

      as many as are needed

    • C.

      5 at the most

    • D.

      Only 1

    Correct Answer
    B. as many as are needed
    Explanation
    There is no specific limit to the number of elseif clauses that can be put in conditional code. The number of elseif clauses can vary depending on the specific requirements and conditions of the code. Therefore, as many elseif clauses can be used as are needed to fulfill the desired logic and conditions of the code.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jun 14, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 13, 2015
    Quiz Created by
    Rowanwd
Back to Top Back to top
Advertisement