i was programming an assembler as part of my assignment. In that to check errors in the program, i wanted to check whether the argument is an intiger or a character? Can any one help me how to do that?
Thanks in advance
this is not simple as once a character has been read into memory it is represented by an integer character code such as ASCII, see
http://www.asciitable.com/
you can check if an integer represents a character code such as a digit, alphabetic, etc using functions such as isdigit(), isalpha(), see
http://www.cppreference.com/stdstring/index.html
however, although decimal 65 is the ASCII code for A it could have been entered as an integer