Which data type is used for storing phone no.? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Which data type is used for storing phone no.?

6th Jul 2017, 12:12 PM
Prajakta Dilip Jadhav
5 Answers
+ 8
We have had a lot of debate over this IRL. I would go for string. (Taking into consideration if you had a number which starts with multiple zeros)
6th Jul 2017, 12:19 PM
Hatsy Rei
Hatsy Rei - avatar
+ 2
As others mentioned, string is the way to go. For most phone numbers, an int wouldn't be a problem, but as they mentioned, you get into octals when you start throwing zeros on the front of ints.
6th Jul 2017, 12:34 PM
AgentSmith
0
no..
6th Jul 2017, 12:16 PM
Prajakta Dilip Jadhav
0
how
6th Jul 2017, 12:17 PM
Prajakta Dilip Jadhav
- 4
integer. it is small size on memory.
6th Jul 2017, 12:14 PM
Hello Buddy
Hello Buddy - avatar