saylor.org 3exam samples cs101 Questions and Answers
0 view 0 purchase
Course
World History Saylor
Institution
World History Saylor
3exam samples cs101 Questions
and Answers
Which of the following modifiers means that the member will only be accessible within the
class?
Select one:
a. private
b. protected
c. public
d. confidential a. private
Which of the following are unique characteristics of object-oriented progr...
saylor.org 3exam samples cs101 Questions
and Answers
Which of the following modifiers means that the member will only be accessible within the
class?
Select one:
a. private
b. protected
c. public
d. confidential a. private
Which of the following are unique characteristics of object-oriented programming languages
compared with procedure programming languages?
Select one:
a. functions and types
b. types and classes
c. classes and objects
d. statements and functions c
Fill in the blanks. ____ and ____ are object-oriented programming languages.
, saylor.org 3exam samples cs101 Questions
and Answers
Select one:
a. C++, FORTRAN
b. FORTRAN, Java
c. Java, C++
d. C, C++ b
What does the following code output?
int x = 5, y = 9;
int z = 8;
int answer = (x + y) * 2 % z;
System.out.println(answer);
Select one:
a. 4
b. 6
c. 8
d. 9 a. 4
, saylor.org 3exam samples cs101 Questions
and Answers
Which of the following compound logical expressions represents "height is greater than 68 and
less than 72"?
Select one:
a. 68 < height < 72
b. height < 68 && height > 72
c. height > 68 && height < 72
d. height > 68 || height < 72 c
Given the following Boolean variables:
boolean p1 = false, p2 = false, p3 = true;
Using a truth table, which of the following Boolean expressions has the logical value "true"?
Select one:
a. p1 || !p2 && p3
b. p1 && p2 || !p3
c. p1 && !p2 && p3
d. p1 || p2 || !p3 a. p1 || !p2 && p3
, saylor.org 3exam samples cs101 Questions
and Answers
What would the value of answer be after the following code is executed?
int answer = 200, w = 10;
for (int k = 4; k > 2; k--)
{
answer = answer - w * k;
}
System.out.println(answer);
Select one:
a. 70
b. 100
c. 130
d. 160 1
What would the value of total be after the following code is executed?
int total = 0;
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 UpperClass. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $20.49. You're not tied to anything after your purchase.