signed/ unsigned what!!

This is a discussion on signed/ unsigned what!! within the C Programming forums, part of the General Programming Boards category; hello all!! i'm a noob learning c and i dont really understand signed and unsigned char/ int's. I know they're ...

  1. #1
    Registered User the bassinvader's Avatar
    Join Date
    Jul 2006
    Location
    Europe
    Posts
    51

    Question signed/ unsigned what!!

    hello all!!

    i'm a noob learning c and i dont really understand
    signed and unsigned char/ int's.

    I know they're important but i'm having trouble getting to grips with
    the effect they have and why they're important, so can some good samaritan
    give me an explanation or send me to someone who can??

    thanx to all

  2. #2
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Signed and unsigned are sneaky scientist words. You can think of a signed value like the numbers you learned in grade school math except now there are limits. An unsigned value is like a car's odometer. When it gets to the end, it rolls over to the beginning again.

    As for the types themselves, int is a little box that can hold a number and char is just a smaller box.

    [edit]
    I found it most amusing that I answered this question while taking a break from an article about zero point energy. Am I a nerd?
    [/edit]
    My best code is written with the delete key.

  4. #4
    ex-DECcie
    Join Date
    Dec 2005
    Posts
    125
    Quote Originally Posted by Prelude

    [edit]
    I found it most amusing that I answered this question while taking a break from an article about zero point energy. Am I a nerd?
    [/edit]

    Probably, but that doesn't make you a bad person....
    Mr. Blonde: You ever listen to K-Billy's "Super Sounds of the Seventies" weekend? It's my personal favorite.

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