Save
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

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.

Question

In C++, you can use the ____ function to determine the number of character contained in a string variable.
click to flip
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't know

Question

What is the syntax for the length function?
Remaining cards (19)
Know
0:00
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

C Chapter 12

QuestionAnswer
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.
Created by: darkskye
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards