Thread: int vs BIG INT

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    3

    Question int vs BIG INT

    Hi!

    My teacher wrote a big int, and she wants me to compare it to an int but the thing is I don't know all what an int can do.

    What are all the things an int can do?

    Here is what I managed to find out so far... am I missing anything?

    --

    unary operator + (value of argument)
    unary operator - (negate)

    binary operator + (addition)
    binary operator - (subtraction)
    binary operator * (multiplication)
    binary operator / (division)
    binary operator << (left shift)
    binary operator >> (right shift)
    binary operator += (addition with assignment)
    binary operator -= (subtraction with assignment)
    binary operator *= (multiplication with assignment)
    binary operator /= (division with assignment)
    binary operator <<= (left shift with assignment)
    binary operator >>= (right shift with assignment)
    unary operator ++ (increment [prefix])
    unary operator ++ (increment [postfix])
    unary operator -- (decrement [prefix])
    unary operator -- (decrement [postfix])
    binary operator % (modulus)
    binary operator = (assignment)
    unary operator ! (logical 'not')
    binary operator == (equality)
    binary operator != (inequality)

    --

    Thanks!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Theres a few more

    Bitwise
    & and
    | or
    ^ exclusive or
    and the corresponding assignment versions
    &=
    |=
    ^=

    Also bitwise not
    ~

    Relational operators
    < less than
    <=
    >
    >=

    Logical
    && and
    || or

    ints are also used in array subscripts [], but you could never declare an array big enough that it would take a bigint to subscript it.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to combine these working parts??
    By transgalactic2 in forum C Programming
    Replies: 0
    Last Post: 02-01-2009, 08:19 AM
  2. Replies: 26
    Last Post: 11-30-2007, 03:51 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  5. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-02-2003, 12:26 AM