1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Svetlanka [38]
3 years ago
11

_________function tells the cin object to skip one or more characters in the keyboard buffer.

Computers and Technology
1 answer:
Amanda [17]3 years ago
8 0

Answer:

cin.ignore function written as  cin.ignore()

Explanation:

  • As we know that cin is an object that is used to obtain the input entered by the user through the keyboard.
  • cin.ignore() is a function which is used to ignore or skip one or more characters in the keyboard buffer.
  • Keyboard buffer is a small storage area which is used to store keystrokes.
  • When a key is pressed on the keyboard it is referred to as a keystroke.
  • So before processing, these keystrokes are stored in keyboard buffer.
  • So when we use cin to input a character from the user through the keyboard, the keyboard buffer must be empty. If that's not done then the character entered will be taken by the buffer of previous variable.
  • Lets take an example of why we want to use cin.ignore() function.
  • For example you want the employee (user) to enter his name and you are using cin to read this name from the user.

                                          char empname[8];

                                           cin>>empname;

  • Now if the user types his name lets say Anonymous and press enter key this will be taken as new line character and it will store this newline character \n into the buffer.
  • cin >> statement reads data from the buffer and stops reading when it reaches newline character.
  • So Anonymous is read in and stored in empname variable but newline character is left in the keyboard buffer.                          
  • Lets say after cin>>empname we write another statement that takes a character from user. A user wants to enter character "a".

                                char character;

                            character = cin.get();

  • When cin.get finds the newline  character \n in keyboard buffer, it uses it (as cin.get can read the newline character in the buffer) without waiting for the  user to input "a".
  • So cin.ignore() function is used to avoid such situation.
  • We can specify the characters to be ignore within the cin.ignore() function such as cin.ignore(10,'\n') will ignore 10 characters in the buffer before taking new line or until a \n character comes.
  • You can simply use cin.ignore() which will ignore the very next character just as \n in our example. In our example we can use cin.ignore() after the cin>>empname; and before using cin.get();
You might be interested in
A tornado destroyed many
m_a_m_a [10]

Answer:

D is your answer because I'm an expert

5 0
2 years ago
Read 2 more answers
List 5 differences between monitors and printers​
Alinara [238K]
Monitor is a display for a computer system.
monitor is the primary memorable device.
a printer is a device that builds one static image and captures it permanently on a suitable medium.
a printer cannot project information unlike a monitor.
a monitor is mainly used for commands.
4 0
2 years ago
Which is a value of the Scrum Manifesto?
erma4kov [3.2K]

Answer: I think the answer is a. working software over comprehensive documentation

Explanation: Agile Manifesto is a brief document built on 4 values and 12 principles for agile software development. The Agile Manifesto was published in February 2001 and is the work of 17 software development practitioners who observed the increasing need for an alternative to documentation-driven and heavyweight software development processes.

7 0
2 years ago
Kevin would like to ensure that his software runs on a platform that is able to expand and contract as needs change. Which one o
Reil [10]

A terminology which best describe Kevin's goal in terms of expansion and contraction as needs change is: A. Scalability.

<h3>What is scalability?</h3>

Scalability can be defined as a measure of the ability of a system to change (expansion or contraction) in performance and cost as a result of changes in demands of application and system processing, especially in a network architecture.

In this context, we can logically deduce that a terminology which best describe Kevin's goal in terms of expansion and contraction as needs change is scalability.

Read more on scalability here: brainly.com/question/14301721

#SPJ1

Complete Question:

Kevin would like to ensure that his software runs on a platform that is able to expand and contract as needs change.  Which one of the following terms best describes his goal? A. Scalability B. Elasticity C. Cost effectiveness D. Agility

8 0
1 year ago
Which of these is not a type of socket?/computer wise
d1i1m1o1n [39]

Many sockets have existed throughout history but only three are relevant today. These are LGA, PGA and BGA.

8 0
3 years ago
Other questions:
  • The analog signals that carry analog or digital data comprise composites built from combinations of simple sine waves.
    12·1 answer
  • The sum of all the minterms of a boolean function of n variables is equal to 1.
    7·1 answer
  • The term ________ refers to the use of a single unifying device that handles media, Internet, entertainment, and telephone needs
    7·1 answer
  • A computer that delivers requested webpages to your computer or mobile device is a(n) _________.
    9·1 answer
  • An electronic braille embosser that translates text from a braille keyboard to a printer:
    10·1 answer
  • Are one of the greatest features of Photoshop that allow nondestructive editing of images.
    6·1 answer
  • Why are object-oriented languages very popular?
    11·2 answers
  • Formatting means ____________
    12·2 answers
  • Complete the function favoriteFlower(). Note that the program will not run as is because the function is incomplete. The purpose
    15·1 answer
  • allows users to enter text and control the computer with their voice.allows users to enter text and control the computer with th
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!