Re: Convert ASCII code to equivalent numerical value

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi

'0' is a character, and looks to the interpreter like 48, so

48 + 2 = 50

'0' + 2 = 50

To the interpreter, it's the same thing

similarly

'A' + 3 = 'C'

try

puts(1, 'A' + 3)

Cheers

Chris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu