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

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

For the operator + to work with the string data type, one of the operands of + must be a(n) ____________________ variable.

(Short Answer)
4.8/5
(32)

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.8/5
(35)

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

(Multiple Choice)
4.8/5
(32)

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
(32)

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.9/5
(41)

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

(Multiple Choice)
4.8/5
(38)

Suppose str = "ABCDEFGHI". The output of the statement cout << str.length() << endl; Is ____.

(Multiple Choice)
4.9/5
(36)

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

(Multiple Choice)
4.8/5
(34)

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

(True/False)
4.9/5
(33)

A data type wherein you directly specify values in the variable declaration with no type name is called a(n) ____________________type.

(Short Answer)
4.8/5
(42)
Showing 41 - 50 of 50
close modal

Filters

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