Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
  1. C-style Strings are terminated with a(n) __________ .
  • newline character \n
  • nullptr
  • null character \0
  • a blank space
  1. The function we can use to copy one C-style string to another is __________ .
  • strlen
  • strcpy
  • strcat
  • copy_string
  1. In order to use C-style string functions we must #include __________ .
  • "cstring"
  • <ctype>
  • <string>
  • <cstring>

Got this wrong... Thought prompt had typo and picked for but wrong... Also thought C++ string and not C-style string so picked but also wrong.

  1. To conert a char to its upper case equivalent we can use the __________ function.
  • uppercase
  • makeupper
  • toupper
  • isupper
  1. The C-style string name[6] can __________ .
  • contain the name "Curly"
  • contain the name "Buster"
  • be assigned with name = "Larry"
  • grow in size as needed
  1. In order to use a C++ string object, we must #include __________ .
  • "cstring"
  • <ctype>
  • <string>
  • <cstring>
  1. The + operator allows us to __________ two C++ strings.
  • add
  • capitalize
  • concatenate
  • superscript
  1. In order to find the index of a substring within a C++ string, we can use the __________ methods.
  • locate
  • find
  • inspect
  • substring
  1. We can compare two C++ strings using the __________ .
  • stcmp function
  • is_equal_to function
  • test
  • == operator
  1. Which of the following are true about C++ strings?
  • C++ strings are objects
  • C++ strings have rich set of member methods
  • C++ strings are preferred over C-style strings
  • C++ strings can change in size dynamically
  • All of the above