What is the name of the flag variable-coding scheme

Assignment Help Other Subject
Reference no: EM13225852

1. Which of the following is the same as the mean?
a. median
b. sum
c. arithmetic average
d. logarithm
2. The process of reversing the positions of two variables is called ____.
a. sorting
b. swapping
c. selecting
d. inserting
3. Which of the following is considered to be a popular coding scheme?
a. ASCII
b. EBCDIC
c. Unicode
d. All of the above
4. An array must have a(n) ____ size.
a. finite
b. infinite
c. random
d. small
5. What is the name of the flag variable in the following code?
sortScores()
pairsToCompare = numberOfEls - 1
switchOccurred = "Yes"
while switchOccurred = "Yes"
x = 0
switchOccurred = "No"
while x if score[x] > score[x + 1] then
perform switchValues()
switchOccurred = "Yes"
endif
x = x + 1
endwhile
pairsToCompare = pairsToCompare - 1
endwhile
return
a. switchOccurred
b. pairsToCompare
c. numberOfEls
d. x
6. What is the purpose of the flag variable in a bubble sort?
a. to eliminate unnecessary swaps
b. to eliminate unnecessary comparisons
c. to stop as soon as the list is sorted
d. to sort an array of unknown size
7. Which of the following sorting methods is least efficient?
a. insertion
b. selection
c. basic bubble sort
d. optimized bubble sort
8. Why is a bubble sort often presented first when learning sorting
methods?
a. it is the fastest
b. it is the most efficient
c. it is easiest to understand
d. it uses fewer loops than other methods
9. In a(n) ____ sort all of the array elements are moved to make room for the newly sorted element.
a. swap
b. selection
c. bubble
d. insertion
10. In a(n) ascending ____ sort the first element in the array is assumed to be the smallest.
a. bubble
b. swap
c. selection
d. insertion
11. When a large amount of data needs to be sorted, it is more efficient to store the logical order and the physical address in a(n) ____ than
to sort the data.
a. index
b. array
c. memory address
d. linked list
12. What is an example of a batch program?
a. Internet browser
b. airplane reservation system
c. payroll processing system
d. word processing program
13. What is another name for an interactive program?
a. batch program
b. real-time application
c. menu program
d. offline program
14. Menus are used in ____ programs.
a. batch
b. interactive
c. command-line
d. offline
15. A menu without a ____ is very frustrating for a user.
a. quit option
b. save option
c. submenu
d. console
16. Many organizations provide a(n) ____ menu to callers to handle routing of telephone calls.
a. audio
b. graphical user interface
c. batch
d. console
17. Module statements that are "invisible" to the rest of the program are said to be in a(n) ____.
a. function
b. black box
c. orange triangle
d. loop
18. In programming, there is a saying that no program is ever really ____.
a. original
b. elegant
c. well-written
d. completed
19. When a menu contains numerous options, it is more elegant to use
a(n) ____ structure than a series of decisions.
a. case
b. loop
c. if then else
d. batch
20. Programs that make it easy for the user to make desired choices are
termed ____.
a. complete
b. elegant
c. user-friendly
d. windows
21. ____ values can hold both letters and numbers.
a. Numeric
b. Boolean
c. Character
d. Black box
22. When using a case structure to process a menu selection, a program with four menu options will require ____ cases.
a. 1
b. 3
c. 4
d. 5
23. Programs that anticipate user errors employ ____ programming.
a. poor
b. defensive
c. elegant
d. weak
24. A file with ordered records is a ____ file.
a. sorted
b. sequential
c. temporal
d. random
25. Frequently records are stored in order of their ____ field.
a. primary
b. unique
c. key
d. numeric
26. What record will appear first in a merged file created from the two files listed below?
East Coast File
eastName eastBalance
Able 100.00
Brown 50.00
Dougherty 25.00
Hanson 300.00
Ingram 400.00
Johnson 30.00
West Coast File
westName westBalance
Chen 200.00
Edgar 125.00
Fell 75.00
Grand 100.00
a. Able 100.00
b. Chen 200.00
c. Grand 100.00
d. Johnson 30.00
27. What type of variable controls the main loop of a file merging program?
a. temporary
b. file
c. flag
d. character
28. When merging, a ____ is used to determine which file the next record comes from.
a. comparison
b. loop
c. sequence
d. flag
29. What action does a merging program take after it writes a record from file 2?
a. writes the next entry from file 1
b. writes the next entry from file 2
c. reads the next entry from file 2
d. reads the next entry from file 1
30. When merging two files, an eof condition is detected in one file. In order to continue processing a ____ value is set in the comparison
variable.
a. dumb
b. high
c. null
d. flag
31. Which of the following would be the best character high value?
a. AAAAAAAA
b. ABC
c. X
d. ZZZZZZZZZZ
32. Why might it be a good idea to create a copy of the master file before updating it?
a. more efficient
b. creating a copy eliminates duplicate values
c. takes less time
d. in case there are questions regarding the update process
33. When a child file is updated, it becomes a parent, and its parent becomes a ____.
a. merged file
b. transaction file
c. grandparent
d. master
34. When writing a program to match master and transaction methods, what should happen when the value of the master key is greater
than the transaction key?
a. an error has occurred and should be logged
b. there are no changes to the master
c. the master should be updated
d. the transaction should be updated
35. When updating a master file with data from a transaction file, what should happen for an addition record when a match is found in the
master file?
a. an update should be made
b. an error message should be printed
c. the master record should be removed
d. a new record should be added
36. What happens during a merging program when both input files contain the same value?
a. an error occurs
b. the program exits
c. two identical records will appear in the merged file
d. only one record will appear in the merged file
37. One of the benefits of ____ is that each module needs to use only the variable names declared within it, so multiple programmers can
create the individual modules without knowing the data names used
by the other modules.
a. encapsulation
b. abstraction
c. modularization
d. cohesion
38. In most modern programming languages such as Java and C++, parameters in the header are separated by the ____ character.
a. . (period)
b. , (comma)
c. * (asterisk)
d. # (pound)
39. The ____ statement passes a value back to the calling module.
a. return
b. exit
c. pass
d. value
40. You should examine the ____ of a programming language to see what functions it provides.
a. methods
b. documentation
c. Web site
d. compiler
41. A device that you can use without understanding the internal workings is a ____.
a. subroutine
b. black box
c. blue triangle
d. computer
42. You need to understand a subroutine's ____ in order to use it.
a. internal structure
b. local variables
c. programming style
d. interface
43. The variable's ____ in no way affects how the method is called from another module.
a. local name
b. data type
c. size
d. definition
44. When designing modules to use within larger programs, some programmers find it helpful to use a(n) ____ chart, a tool that
identifies and categorizes each item needed within the module as pertaining to input, processing, or output.
a. printer
b. IPO
c. Slad
d. I/O
45. To beginning programmers, using only ____ variables seems like a far simpler option than declaring local variables and being required
to pass them from one module to another.
a. global
b. shared
c. undeclared
d. constant
46. Passing values to a module helps facilitate ____.
a. confusion
b. encapsulation
c. sharing
d. black boxes
47. ____ is a feature of programs or modules that have been tested and proven to work correctly.
a. Reusability
b. Expense
c. Reliability
d. Efficiency
48. ____ cohesion occurs in modules that perform tasks that share data.
a. Procedural
b. Functional
c. Communicational
d. Sequential
49. A module that performs tasks based on a decision statement has
____ cohesion.
a. procedural
b. temporal
c. logical
d. functional
50. A housekeeping routine exhibits ____ cohesion.
a. functional
b. temporal
c. procedural
d. logical 

Reference no: EM13225852

Questions Cloud

Controversy around same sex marriage : How would you do a full sentence outline on this thesis statement: The controversy around same sex marriage is centered in religious or moral convention.
Compute the ph of the solution after adding naoh : An acetate acetic acid buffer has a pH = 5.00, containing 0.100 M NaOAc. Calculate the pH of the solution after adding 10 mL of 0.10 M NaOH to 100 mL of this buffer.
What was done to improve efficiency adaptation : what was done to improve efficiency adaptation and human relations and how were the potential trade off among these performance determinant handled.
Explain a hydrogen atom with an electron in its ground state : A hydrogen atom with an electron in its ground state interacts with a photon of light with a wavelength of 1.22 × 10-6m. Could the electron make a transition from the ground state to a higher energy level?
What is the name of the flag variable-coding scheme : The process of reversing the positions of two variables is called. Which of the following is considered to be a popular coding scheme?  What is the name of the flag variable in the following code? What is the purpose of the flag variable in a bubble ..
Determine what is the lenght of the sequence : Let x[n], y[n] and w[n] denote three finite-lenght sequences of lenghts N, M, and L, respectively with the first sample of each sequence occuring at n=0. What is the lenght of the sequence x[n] * y[n] * w[n]
How the reverse movement of the motor be controlled : Design I/O wiring to control forward and reverse 12Vdc motor using PLC OMRON CJ1M. Consider that the forward movement of the motor will be controlled by a forward button and the reverse movement of the motor will be controlled by a reverse button
Explain hydrogen sulfide decomposes reaction : Hydrogen sulfide decomposes according to the following reaction, for which, Kc=9.30 x 10^-8 at 700 degrees C.
Explain a solution to adjust the ph : How many moles of H3O+ must be added to 482 mL of a solution to adjust the pH from 8.80 to 5.56? Use E notation and 3 significant figures.

Reviews

Write a Review

Other Subject Questions & Answers

  Sources and characteristics of the international style

Explain the sources and characteristics of the International style. Use examples to support your response.

  Popular doctorine at the turn of the 20th century

What was the popular doctorine at the turn of the 20th century that said men and women had different natures and that women's nature fitted them for a higher and more spiritual realm

  Italian american reconciliation

READ the entire drama book "Italian American Reconciliation" by John Patrick Shanley, and explain how Janice lives in her world and what she wants most in her life and what she wants to achieve in her future.

  Socio-emotional development

Someone once said that you could fill a train's box car with all of the research done on the importance of mothers to a child, but you couldn't even fill the back of a small pickup truck with the research done on the importance of the father. Just ho..

  Development of the american court systems

Discuss in depth the development of the American Court Systems. Book is With justice for all? Nature of the American Legal System by Michael Fowler.

  Employee conduct and behavior-practices prohibited

What is the principal reason why the work organization formulates and publishes a code of ethics enumerating its standards of employee conduct and behavior?

  Business practices of an organization

Do you believe that human psychology plays an important part in determining the business practices of an organization?

  Building a safer health system

Examine Lucian Leape, his impact on teh patient safety, and how the Institute of Medicine's report, To Err is Human: Building a Safer Health System was his motivation and impetus for the change.

  How legal codes and economic forces to prevent slaves

Describe how legal codes and economic forces conspired to prevent slaves, peasants, and workers from getting rights as men and citizens.

  What is the nature of the business

What are the external and internal factors that require your organization to change? What is the nature of the business (general vs. specialized tasks, large vs. small, stable vs. changing goals, etc.)?

  Apply the criticism of artificiality

Apply the criticism of artificiality to at least three sub disciplines within psychology that conduct research (e.g., abnormal psychology, social psychology, behavioral psychology, etc.).

  Interaction between nature and nurture shapes development

What are some examples in various domains of development (such as emotional, language, cognitive, motor, etc.) where we can clearly see how the interaction between nature and nurture shapes development?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd