Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • 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.
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!