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
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...
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...
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
Assume one input, one output production function which we know very little about. But over a...
Assume one input, one output production function which we know very little about. But over a period of three years we see that (1) with p = 1,w = 1 the firm choose x = 2,y = 5 (2) with p = 3,w = 0.5, the firm will choose x = 4 and y = 6 and (3) withp=4,w=2,thefirmwillchoosex=3,y=11. Graph the isoprofit lines associated with each pair of prices and quantity choices. Show on your graph what we have learned...
ANSWER IN C++ ONLY A string of characters including only alphabets (lowercase letters) is provided as...
ANSWER IN C++ ONLY A string of characters including only alphabets (lowercase letters) is provided as an input. The first task is to compute the frequency of each character appearing in the string. In the output, the characters have to be arranged in the same order as they appear in the input string. Then characters have to be rearranged, such that all the characters having a specific frequency, say xx, come together. Let the frequency of a character, lying in...
1. What is the function of the input membership functions? 2. What is the function of...
1. What is the function of the input membership functions? 2. What is the function of the output membership functions? 3. What is the function of the rule base? 4. What does the surface display show? 5. The Simulink project requires access to some Matlab variables like the pendulum constants and the fuzzy inference system. Where can these variables be place to give Simulink access to them?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT