menu-iconExamlexExamLexServices

Discover

Ask a Question
  1. All Topics
  2. Topic
    Computing
  3. Study Set
    C++ Study Set 1
  4. Exam
    Exam 12: More on C-Strings and the String Class
  5. Question
    Assume That <Sup>str1</sup><sup> </Sup>and <Sup>str2</sup><sup> </Sup>are Objects of the String
Solved

Assume That str1 and str2 are Objects of the String

Question 23

Question 23

Multiple Choice

Assume that str1 and str2 are objects of the string class. The proper expression to use when comparing them for equality is


A) strcmp(str1, str2) .
B) str1.compare(str2) .
C) str1 == str2.
D) str1 = str2.
E) None of the above

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Q19: When using the <sup>strcat</sup>function, you must be

Q20: Assume that <sup>str1</sup><sup> </sup>and <sup>str2</sup><sup> </sup>are variables

Q21: The expression <sup>str1 < str 2</sup><sup> </sup>is

Q21: It is possible to implement a string

Q22: The <sup>>></sup><sup> </sup>operator can be used to

Q24: The code <sup>int x = 0; while

Q25: An array of characters ending with the

Q26: The following statement declares a <sup>string</sup><sup> </sup>object

Q27: The function _ _ accepts pointers to

Q29: There exist C++ stream classes that write

Examlex

ExamLex

About UsContact UsPerks CenterHomeschoolingTest Prep

Work With Us

Campus RepresentativeInfluencers

Links

FaqPricingChrome Extension

Download The App

Get App StoreGet Google Play

Policies

Privacy PolicyTerms of ServiceHonor CodeCommunity Guidelines

Scan To Download

qr-code

Copyright © (2025) ExamLex LLC.

Privacy PolicyTerms Of ServiceHonor CodeCommunity Guidelines