Question

ASAP!!! Which stream function can be used to ignore certain number of characters from the input...

ASAP!!! Which stream function can be used to ignore certain number of characters from the input stream?

Group of answer choices

1. cin.getline

2. getline

3. ci.get

4. getche

5. cin.ignore

Homework Answers

Answer #1

The correct option is Option (5) cin.ignore. This function is used to ignore or clear characters from input buffer/stream.

- cin.getline is used to read unformatted set of characters from the keyboard. It reads complete string until a null match.

- getline function extracts characters from the input stream and appends it to the string object until the delimiting character is encountered.

- getche is a function which waits for any character input and shows the input character on the output screen.

Hence option (5) cin.ignore is the correct answer.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Which manipulator(s) can be used to precisely control the number of decimal point showing in mantissa...
Which manipulator(s) can be used to precisely control the number of decimal point showing in mantissa of a floating point number? Group of answer choices 1. Only lone application of fixed will do it 2. Setprecision by itself without prior application of fixed 3. fixed followed by setprecision 4. setw
Part 1 Write a program that reads a line of input and display the characters between...
Part 1 Write a program that reads a line of input and display the characters between the first two '*' characters. If no two '*' occur, the program should display a message about not finding two * characters. For example, if the user enters: 1abc*D2Efg_#!*345Higkl*mn+op*qr the program should display the following: D2Efg_#! 1) Name your program stars.c. 2) Assume input is no more than 1000 characters. 3) String library functions are NOT allowed in this program. 4) To read a...
Write a function called char_counter that counts the number of a certain character in a text...
Write a function called char_counter that counts the number of a certain character in a text file. The function takes two input arguments, fname, a char vector of the filename and character, the char it counts in the file. The function returns charnum, the number of characters found. If the file is not found or character is not a valid char, the function return -1. As an example, consider the following run. The file "simple.txt" contains a single line: "This...
Suppose that a certain computer password is allowed to be from 8 to 12 characters long,...
Suppose that a certain computer password is allowed to be from 8 to 12 characters long, and may contain only lowercase letters (a to z), uppercase letters (A to Z), and numbers (0 to 9). 1. How many such passwords are possible? 2. How many such passwords are possible if you cannot repeat characters? 3. How many such passwords are possible if you cannot repeat characters, and you must include at least one number?
Animals can be distinguished from all other living organisms by a suite of characters. During your...
Animals can be distinguished from all other living organisms by a suite of characters. During your quarantine you often visited a nearby stream. During one of your adventures you stumbled upon an organism for which you must determine its identity. Your hunch is that this thing is an animal, but you need to make observations to determine this with confidence. Provide the necessary information that allows you to distinguish your organism from each group of living things listed below; you...
Write a Python program to ask user input of a string, then ask user input of...
Write a Python program to ask user input of a string, then ask user input of what letters they want to remove from the string. User can either put in "odd", "even" or a number "n" that is greater than 2. When user input "odd", it will remove the characters which have odd numbers in the sequence of the string. When user input "even", it will remove the characters which have even numbers in the sequence of the string. When...
What function should be used for generating random numbers from the following distribution on the number...
What function should be used for generating random numbers from the following distribution on the number of phone calls per hour? A B C D 1 # of phone calls P(# of phone calls) # of phone calls P(# of phone calls) 2 1 0.10 1 0.10 3 2 0.40 2 0.50 4 3 0.30 3 0.80 5 4 0.15 4 0.95 6 5 0.05 5 1.00
1. In C++, programmers can use a class to create a large number of instance variables...
1. In C++, programmers can use a class to create a large number of instance variables of the class's type. Group of answer choices True False 2. When a C++ programmer declares a function, they are required to state all of the following except Group of answer choices {} The type of data, if any, returned by the function The function name The type of data, if any, sent to the function 3. When a C++ programmer calls a function,...
1) It has been estimated that a certain stream can support 76,000 fish if it is...
1) It has been estimated that a certain stream can support 76,000 fish if it is pollution-free. It has further been estimated that for each ton of pollutants in the stream, 1200 fewer fish can be supported. Assuming that the relationship is linear, write the equation that gives the population of fish p in terms of the tons of pollutants x. 2)A retired woman has $80,000 to invest. She has chosen one relatively safe investment fund that has an annual...
Write a function remove elt(v,a) that takes as input a vector v and a number a,...
Write a function remove elt(v,a) that takes as input a vector v and a number a, and as output returns a vector that is the same as v but with a single value of a removed. For example, if we run remove elt([-2 1 3 1 5], 1 ), then the output should be either [-2 3 1 5] or [-2 1 3 5]. matlab question
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT