signed vs unsigned

This is a discussion on signed vs unsigned within the C Programming forums, part of the General Programming Boards category; Hi I know that default characters may be either signed or unsigned. Is it the compiler that decides if a ...

  1. #1
    Registered User char's Avatar
    Join Date
    Apr 2002
    Posts
    31

    signed vs unsigned

    Hi

    I know that default characters may be either signed or unsigned. Is it the compiler that decides if a char will be signed or unsigned or is it more like it happens at runtime (platform dependent)?

    Thank you in advance !!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    > Is it the compiler that decides if a char will be signed or unsigned
    No, it's the compiler writer who chooses

    Their choice may be based on what the target processor most easily implements, but at the end of the day, they have to implement signed and unsigned chars anyway.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 08-11-2008, 11:02 PM
  2. Heap corruption using zlib inflate
    By The Wazaa in forum C++ Programming
    Replies: 0
    Last Post: 03-29-2007, 12:43 PM
  3. Replies: 16
    Last Post: 10-29-2006, 04:04 AM
  4. Obtaining source & destination IP,details of ICMP Header & each of field of it ???
    By cromologic in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-29-2006, 02:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21