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

Exam (elaborations)

CSC 101 Final Review Exam |Questions with 100% Correct Answers

 1 view  0 purchase
  • Course
  • CSC 101
  • Institution
  • CSC 101

CSC 101 Final Review Exam |Questions with 100% Correct Answers

Preview 3 out of 17  pages

  • October 19, 2024
  • 17
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSC 101
  • CSC 101
avatar-seller
Examcheatcode
CSC 101 Final Review Exam |Questions with
100% Correct Answers
The ____ of an identifier refers to where in the program an identifier is accessible (visible). -
✔️✔️scope



____ identifiers are not accessible outside of the function (block). - ✔️✔️Local


What is the output of the following C++ code?




int alpha = 5;
int beta = 10;


alpha = alpha + 5;


{
int alpha = 20;
beta = beta + 5;
}



cout << alpha << " " << beta << endl; - ✔️✔️10 15



In C++, the scope resolution operator is ____. - ✔️✔️::



Memory for ____ variables remains allocated as long as the program executes. - ✔️✔️global

,____ a function refers to the creation of several functions with the same name. -
✔️✔️Overloading


Suppose that you have the following declaration.


enum cars {FORD, GM, TOYOTA, HONDA};
cars domesticCars = FORD;


The statement:


domesticCars = static_cast<cars>(domesticCars + 1);



sets the value of domesticCars to ____. - ✔️✔️GM


Consider the declaration:


enum sports {BASKETBALL, FOOTBALL, HOCKEY, BASEBALL, SOCCER};



which of the following statements is true? - ✔️✔️FOOTBALL <= SOCCER


What is the output of the following code?


enum courses {ALGEBRA, BASIC, PASCAL, PHILOSOPHY, ANALYSIS};
courses registered;
registered = ALGEBRA;

cout << registered << endl; - ✔️✔️0

, The scope of a namespace member is local to the ____. - ✔️✔️namespace


Which of the following statements is used to simplify the accessing of all globalType namespace
members? - ✔️✔️using namespace globalType;


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



Before using the data type string, the program must include the header file ____. - ✔️✔️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; - ✔️✔️abc-xyz



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


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



cout << str.length() << endl; - ✔️✔️9



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


11 Consider the following statements.


string str = "ABCDEFD";

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