Which data type we can use to store number like credit card or debit card number..?? | Sololearn: Learn to code for FREE!

+2

Which data type we can use to store number like credit card or debit card number..??

9/3/2019 5:33:47 PM

Vaidehi Chotaliya

6 Answers

New Answer

+4

you can store it in an array or a file

+4

Because you won't (and shouldn't) be doing any math operations with a credit card or debit card number, a string is your best option. And in the real world, these numbers are ideally encrypted as well, and I think that encryption is mainly performed on strings.

+2

String is prefect

+1

str or int depending on how you want to store or read it

+1

You could use a string or char*. Char* could be used if you want it to be a little more 'safe and secure'.

0