COSC 175 - FINAL EXAM REVIEW
QUESTIONS AND ANSWERS
To ensure the algorithm is working correctly, a programmer should desk-check it using
both valid and invalid data. (T/F) - Answer -True
C++, Visual Basic, C#, Python, and Java are all examples of what kind of language? -
Answer -programming
There is one universal machine language used by computers. (T/F) - Answer -True
What does the rectangle symbol in a flowchart represent? - Answer -Processing
An example of an instruction written in machine language would be ____. - Answer -
0000 0101 1100 0000
In the following pseudocode algorithm, what is the output given the following inputs?
sale price=2.00
sales tax rate=6%
1. enter the sale price and sales tax rate2. calculate the cost by multiplying the sale
price by the sales tax rate and then adding the result to the sale price3. display the cost
- Answer -2.12
Which type of structure do all programs use? - Answer -Sequence
You need to use both pseudocode and a flowchart when planning an algorithm. (T/F) -
Answer -False
The algorithm is recorded in which section of the IPO chart? - Answer -P-Processing
What is the first step in the problem-solving process? - Answer -analyze the problem
When a value is converted from one data type to another data type that can store
smaller numbers, what type of conversion has occurred? - Answer -Demotion
What is the binary equivalent of the decimal number 9? - Answer -1001
Which number system is used to store data in memory? - Answer -Binary
, Which of the following is a valid integer value?
a. 16.2
b. -456
c. '9'
d. 5.132456e+03 - Answer -B. -456 (integers range from -2, 147,483 to 2, 147,483
Which of the following is a word that has a special meaning in the programming
language you are using? - Answer -keyword
What is the decimal equivalent of the binary number 1010? - Answer -10
What is a memory location whose value cannot change during runtime called? - Answer
-Constant
Memory locations assigned the char data type can store how many characters? -
Answer -1
If the value's data type does not match the memory location's data type, what process
does the computer use to convert the value to fit the memory location? - Answer -
Implicit type conversion
Which of the following best describes a memory location whose value can change
during runtime? - Answer -Variable
An accumulator is a numeric variable used for counting something. (T/F) - Answer -
False
Stream manipulators that do not have arguments, such as fixed and scientific, are
defined in which file? - Answer -Iostream
What would be the result of the following C++ code (assuming all necessary directives)?
double number = 1234.567;
cout << fixed << number << endl; - Answer -1234.567000
A programmer determines whether a problem's solution requires a nested selection
structure by studying which of the following? - Answer -Problem Specification
With short-circuit evaluation, each sub-condition is independent of any other sub-
condition. (T/F) - Answer -False
Comparison operators evaluate to what type of value? - Answer -Boolean
Selection structures that contain instructions on both the true and false paths are
referred to as which of the following? - Answer -dual-alternative
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller millyphilip. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.49. You're not tied to anything after your purchase.