Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.

C Chapter 12

Quiz yourself by thinking what should be in each of the black spaces below before clicking on it to display the answer.
        Help!  

Question
Answer
In C++, you can use the ____ function to determine the number of character contained in a string variable.   length()  
🗑
What is the syntax for the length function?   string.length()  
🗑
In C++, you can use the ___ function to remove one or more characters located anywhere in a string variable.   erase()  
🗑
In an erase function ___ refers to the unique number assigned to each character contained in the string variable; the number indicates the character position in the string.   Subscript  
🗑
What is the syntax for the erase function?   string.erase(subscript[, count])  
🗑
If you omit the ___ argument, the erase function removes all characters from the subscript position through the end of the string.   count  
🗑
You can use the ___ function to access any number of characters contained in a string variable.   substr()  
🗑
The arguments in a substr() function can be ___ or ___   numeric literal contants, names of numeric variables.  
🗑
In C++, you can use the __ function to insert characters within a string variable.   insert()  
🗑
In C++ you can use the ___ function to search a string variable to determine whether it contains a specific sequence of characters.   find()  
🗑
If the searchstring is found(in a find() function), the value will be greater than or equal to 0. TRUE/FALSE?   TRUE  
🗑
If the searchstring is not found(in a find function), the value will be -1. TRUE/FALSE   TRUE  
🗑
In C++, you can use the ___ function to compare a portion of a string variable's contents with another string.   compare()  
🗑
What is the syntax for the compare() function?   string1.compare(subscript, count, string2)  
🗑
In a compare() function, if the character you are searching for comes after the character you are comparing, a ___ will be displayed.   1  
🗑
In a comapre() function, if the character you are searching for comes before the character you are comparing, a ___ will be displayed.   -1  
🗑
In a comapre() function, if the character you are searching for is equal to the character you are comparing, a ___ will be displayed.   0  
🗑
In C++, you can use the __ function to duplicate one character a specified number of times and assign the resulting string to a string variable.   assign()  
🗑
What is the syntax for the assign() function?   string.assign(count, character)  
🗑
Connecting(or linking) strings together is called ___. In C++, you do this by using the ___ ___.   concatenating, concatenation operator.  
🗑


   

Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
 
To hide a column, click on the column name.
 
To hide the entire table, click on the "Hide All" button.
 
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
 
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.

 
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how
Created by: darkskye