Can alphanumeric values be stored in an int data type or do we need a char to store it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Alphanumeric values are not values. They are numbers like everything else, but they follow a specified mapping numer -> character.
For example character ‘A’ is
65according to ASCII encoding. The only difference is how you treat them: if you treat them as numbers then you print out them as numbers, otherwise you print their encoding. Achardata type is just anintwhich has size of 1 byte. Just because 1 byte is enough to store the whole extended ASCII table. There is no real ‘character’ data type.Short answer: yes.