134k views
5 votes
When a program lets the user know that an invalid input choice has been made, this is known as _________________.

User Navjotk
by
8.6k points

1 Answer

7 votes

Answer:

The correct answer for the given question is " input validation"

Step-by-step explanation:

Input validation is also known as data validation which is used for validate or test the user input .

The example of input validation in c++ programming

#include <iostream> // header file

using namespace std;

int main() // main function

{

int a1; // variable declarartiomn

cout << "Enter the age: ";

cin >> a1;

if(a1> 18) // validate user input

{

cout << "You are eligible for vote :";

}

return 0;

}

In this program we input a age from user and validate this user input that .If user enter age > 18 then it will eligible for vote.

output

21

You are eligible for vote

User Mohamed Ibrahim
by
8.2k points