100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CMSC 140 Part 1 Final Exam Review Questions & Answers 2024/2025 $7.99   Add to cart

Exam (elaborations)

CMSC 140 Part 1 Final Exam Review Questions & Answers 2024/2025

 7 views  0 purchase
  • Course
  • CMSC 140 Part 1
  • Institution
  • CMSC 140 Part 1

CMSC 140 Part 1 Final Exam Review Questions & Answers 2024/2025 What does it mean to increment something? What operator is used in C++ to do this? - ANSWERSTo increment something is to increase its value by 1. The operator in C++ is the ++ (plus-plus) operator. What does it mean to decremen...

[Show more]

Preview 2 out of 5  pages

  • November 9, 2024
  • 5
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CMSC 140 Part 1
  • CMSC 140 Part 1
avatar-seller
Bensuda
CMSC 140 Part 1 Final Exam Review
Questions & Answers 2024/2025

What does it mean to increment something? What operator is used in C++ to do this? - ANSWERSTo
increment something is to increase its value by 1. The operator in C++ is the ++ (plus-plus) operator.



What does it mean to decrement something? What operator is used in C++ to do this? - ANSWERSTo
decrement something is to decrease its value by 1. The operator in C++ is the -- (minus-minus) operator.



Prefix Mode - ANSWERSThe value is incremented before used in any expression in the same statement.



Postfix Mode - ANSWERSThe value is incremented after used in any expression in the same statement.



What does it mean to find the modulus of something? What operator is used in C++ to do this? -
ANSWERSTo find the remainder after the division of two numbers. The operator % is used in C++



What operator is used in C++ to represent division? - ANSWERSThe / operator is used to represent
division in C++.



What will be the data type of the result of division between two integers? - ANSWERSThe data type will
be an integer.



What will be the result of the expression ? - ANSWERS3



What will be the result of the expression 7.0/2 - ANSWERS3.5



What will the variables 'someNum', 'anotherNum', 'lastNum', and 'aBool' contain after the execution of
the following code?:

, int someNum = 2, anotherNum = 3, lastNum = 1;

bool aBool;



aBool = !(++someNum > (--anotherNum * lastNum++)); - ANSWERSsomeNum = 3, anotherNum = 2, and
lastNum = 2



Name the three different types of loops - ANSWERSWhile Loop, do-while loop, and for loops



Pretest - ANSWERSEvaluate its expression before the loop executes once.



Posttest - ANSWERSEvaluate its expression after the loop executes once.



What loops are posttest? - ANSWERSdo-while loop



What loops are pretest? - ANSWERSwhile loop and for loop



What are the three parts of a for loop definition called? - ANSWERSInitialization, test, and update



What will be displayed on the screen after the execution of the following code?



int counter = 0;

bool moreThan20 = false;

while (!moreThan20)

{

if (counter != 6)

{

cout << counter << endl;

}

if (counter == 14)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 Bensuda. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79223 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart