Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

No arithmetic operations are allowed on the enumeration type.

(True/False)
4.8/5
(43)

The string expression strVar.____________________ starts at index pos, replaces the next n characters of strVar with all the characters of str.

(Short Answer)
4.8/5
(31)

The following is a valid C++ enumeration type:enum places {1ST, 2ND, 3RD, 4TH};.

(True/False)
4.8/5
(29)

The scope of a namespace member is local to the ____.

(Multiple Choice)
4.8/5
(34)

What is the output of the following code? enum courses {ALGEBRA, BASIC, PASCAL, PHILOSOPHY, ANALYSIS}; Courses registered; Registered = ALGEBRA; Cout << registered << endl;

(Multiple Choice)
4.9/5
(34)

The string expression strVar.____________________ inserts all the characters of str at index pos into strVar.

(Short Answer)
4.8/5
(28)

The length of the string "Hello There." is ____.

(Multiple Choice)
4.7/5
(47)

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

(Multiple Choice)
4.7/5
(32)

In C++, [] is called the array subscript operator.

(True/False)
4.8/5
(37)

An anonymous type can be passed as a parameter to a function.

(True/False)
4.8/5
(42)

Consider the following statements:string str1 = "ABCDEFGHIJKLM"; string str2; After the statement str2 = str1.substr(1,4); executes, the value of str2 is "____".

(Multiple Choice)
4.8/5
(32)

In C++, ____ is called the scope resolution operator.

(Multiple Choice)
4.9/5
(39)

In C++, ____ is a reserved word.

(Multiple Choice)
5.0/5
(38)

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 "____".

(Multiple Choice)
4.8/5
(37)

In ANSI/ISO Standard C++, the ____________________ mechanism was designed to solve the problem of overlapping global identifiers.

(Short Answer)
4.8/5
(34)

Given the following code namespace globalType { Void printResult(); } Which of the following statements is needed to access printResult?

(Multiple Choice)
4.7/5
(41)

A function cannot return the value of an enumeration type.

(True/False)
4.8/5
(34)

Which of the following is a valid C++ statement?

(Multiple Choice)
4.9/5
(44)

In C++, you can create aliases to a previously defined data type by using the ____ statement.

(Multiple Choice)
4.8/5
(37)

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

(Multiple Choice)
4.8/5
(39)
Showing 21 - 40 of 40
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)