100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSC 101 Final Review Questions with Correct Answers $12.49   Add to cart

Exam (elaborations)

CSC 101 Final Review Questions with Correct Answers

 9 views  0 purchase
  • Course
  • CSC 101
  • Institution
  • CSC 101

CSC 101 Final Review Questions with Correct Answers Which of the following statements is used to simplify the accessing of all globalType namespace members? - Answer-using namespace globalType; The identifiers in the system-provided header files such as iostream, cmath, and iomanip are defined...

[Show more]

Preview 2 out of 11  pages

  • September 18, 2024
  • 11
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSC 101
  • CSC 101
avatar-seller
Scholarsstudyguide
CSC 101 Final Review Questions
with Correct Answers
Which of the following statements is used to simplify the accessing of all globalType
namespace members? - Answer-using namespace globalType;

The identifiers in the system-provided header files such as iostream, cmath, and
iomanip are defined in the namespace ____. - Answer-std

Before using the data type string, the program must include the header file ____. -
Answer-string

Suppose that str1, str2, and str3 are string variables. After the following statements
execute, the value of str3 is "____".

str1 = "abc";
str2 = "xyz";
str3 = str1 + '-' + str2; - Answer-abc-xyz

Suppose str = "xyzw";. After the statement str[2] = 'Y'; The value of str is "____". -
Answer-xyYw

Suppose str = "ABCDEFGHI". The output of the statement

cout << str.length() << endl; - Answer-9

The length of the string "Hello There. " is ____. - Answer-13

11 Consider the following statements.

string str = "ABCDEFD";
string::size_type position;

After the statement position = str.find('D'); executes, the value of position is ____. -
Answer-3

11 Considering the statement string str = "Gone with the wind";, the output of the
statement cout << str.find("the") <<

endl; is ____. - Answer-10

, 11 Consider the following statements.

string str1 = "ABCDEFGHIJKLM";
string str2;

After the statement str2 = str1.substr(1,4); executes, the value of str2 is "____". -
Answer-BCDE

11 Consider the following statements.

string str1 = "Gone with the wind";
string str2;

After the statement str2 = str1.substr(5,4); executes, the value of str2 is "____". -
Answer-with

11 The ____ function is used to interchange the contents of two string variables. -
Answer-swap

11 Which of the following statements declares alpha to be an array of 25 components of
the type int? - Answer-int alpha[25];

Assume you have the following declaration int beta[50];. Which of the following is a valid
element of beta? - Answer-beta[0]

What is the output of the following loop?

count = 5;
cout << 'St';
do
{
cout << 'o';
count--;
}
while (count <= 5); - Answer-This is an infinite loop.

____ loops are called post-test loops. - Answer-do...while

Which of the following loops does not have an entry condition? - Answer-do...while loop

The ____ statement can be used to eliminate the use of certain bool variables in a loop.
- Answer-break

What executes immediately after a continue statement in a while and do-while loop? -
Answer-loop-continue test

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 Scholarsstudyguide. 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.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

83637 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
$12.49
  • (0)
  Add to cart