• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

integer/numeric value of char

 
pankaj agarwal
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is meant by 1. integer value 2. numeric value of a char literal???
Thanks in advance
pankaj
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From www.dictionary.com

in�te�ger (nt-jr)
n. Mathematics
A member of the set of positive whole numbers (1, 2, 3, . . .), negative whole numbers (-1, -2, -3, . . .), and zero (0).
A complete unit or entity.

A character can hold alphabetic values as well as integer values. So if we have:
char c = '9';
the character could be alpha OR numberic. The numeric value of this character literal is the integer 9.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic