233k views
2 votes
You need to design an online login form in which users have to type their name and password to log into an application. The password can be a combination of numbers and letters. Which data type is most suitable for a password field?

2 Answers

4 votes

The type string is most suitable

User Marik
by
6.6k points
3 votes

Answer:

The correct answer is data type string.

Step-by-step explanation:

Numeric data types(int, float, double, etc) are not suitable because you cannot incluse letters, just numbers. For example.

int x = 124320 is valid

int x = 12a45re is not valid.

The data type string is the one that allows the combination of numbers and letters. For example

char password[] = "bills2019" is valid

So the correct answer is data type string.

User AmrAngry
by
6.1k points