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
Which of the following does Secure Sockets Layer (SSL) use to authenticate a user or system before encrypting a session?
ale4655 [162]

Answer:

B is more probable option than C

Explanation:

I think its both B and C

3 0
2 years ago
Which of the following terms refers to the cells that contain values and labels to be graphed in the chart?.
quester [9]

There are cells in some charts. The terms that refers to the cells that contain values and labels to be graphed in the chart is source data.

<h3>What is the meaning of source data?</h3>

Source data is known to be a kind of raw data that is often known as an atomic data. They are data that has not been processed for any vital use to become Information.

In computer programming tech., source data or data source is known to be a kind of primary point or location from where data originates from. The data source is known as a database, a dataset, etc.

Learn more about source data from

brainly.com/question/10838478?source=archive

7 0
2 years ago
Consider the relational schema below: Students(sid: integer, sname: string, major: string) Courses(cid: integer, cname: string,
daser333 [38]

Solution :

Here, we need to perform JOIN operation of the students and registration.

Use NATURAL JOIN operator \Join and so no need to specify Join condition.

Also we need to selection operator tp select only those course whose major in "philosophy".

Finally we projection operator π to project only distinct students name who took at least three courses.

$\pi [\sigma_{\text{student's nam}e} [ \sigma(\text{three courses}) \Join \text{"Philosophy"}]]$

7 0
3 years ago
The process of engineering design typically starts with what ?
klemol [59]

The process of engineering typically starts with brainstorming.
6 0
3 years ago
___________ is an unsecured client server application / protocol that transfers files between two computers.
Alexus [3.1K]
It is known as the File Transfer Protocol or FTP. It is based on a customer server demonstrate design and uses isolate control and information associations between the customer and the server. FTP clients may conform themselves with an unmistakable content sign-in convention, regularly as a username and secret word, yet can interface namelessly if the server is designed to permit it.
6 0
3 years ago
Other questions:
  • kai is interviewing for a job, and the interviewer asks him for an example of skill at cooperating with others. Which example be
    14·2 answers
  • which of the following is a malicious program that can replicate and spread from computer to computer? A. Email B. Virus C. Spam
    15·1 answer
  • What ipconfig command line option can be used to delete cached dns information from memory?​?
    9·1 answer
  • How major is the technology problem in the United States?
    15·1 answer
  • Accepting criticism is a trait of what people?
    5·1 answer
  • Write a program that asks for the weight of a package and the distance it is to be shipped. This information should be passed to
    12·1 answer
  • A photographer uses which of these tools to form an argument?
    14·2 answers
  • 4.11 lesson practice quizz need help on 2 and 3
    5·1 answer
  • 6.What does transgenic mean?​
    12·2 answers
  • to provide for ecmascript compatibility in older browsers, you can use group of answer choices javascript shivs javascript shims
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!