TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Bill Birrell
from: Jasen Betts
date: 2004-01-15 06:35:26
subject: [C] (Thanks)An interesting question

Hi Bill.

13-Jan-04 23:20:00, Bill Birrell wrote to prabir senapati


  >> arithmetic on the elements of this array. How is this possible,
  >> after all elements in the array are characters not integers ? Can
  >> u pls explain me a bit .

 BB> Ints are whole numbers between 0 and MAXINT in value.

AIUI Maxint is a Pascal Cosnstant, INT_MAX otoh is supported by my
compilers, .  INT_MIN is negative and (usually) one
larger than INT_MAX.

ints are between INT_MIN and INT_MAX

 BB> Chars are whole numbers in the range 0 to MAXCHAR (often 255 for
 BB> unsigned and 127 for signed char). Both ints and char can be signed
 BB> or unsigned Integer arithmetic can be performed on both types.

chars can be negative too if signed. both my compilers default to signed
characters, but I think unsigned is possible using a command-line option,
but that won't effect the behavior of library functions...

 -=> Bye <=-
---
* Origin: Dogs come when you call, cats have answering machines (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.