Re: questions of unsigned int, function prototypes

From: ranjeet (ranjeet.gupta_at_gmail.com)
Date: 09/15/04

  • Next message: Darc Kloud: "dont understand looping problem"
    Date: 15 Sep 2004 05:50:16 -0700
    
    

    "away" <Gusalpine@spambs.com> wrote in message news:<sAQ1d.368572$OB3.173995@bgtnsc05-news.ops.worldnet.att.net>...
    > For a unsigned int used as a counter, it keeps increasing its value. Will
    > overflow happen at end? How to handle it if it happens?

      now take the int as 4byte :

      means that it can hold the maximum value as 0 to (2^64 - 1)
      now once u reach more the max limit then it is again assign as the 0
    value
    and the counter will aginn will be set as the 0 value.......

      Now u have to check this value ....
      Now i think u can handle the situation of over flow.....
    >
    > What're purposes about using function prototypes in C?
      
      use of prototype is to tell compiler that thgis sort of function is
    present whcih is going to be used in the main source file..........
      elae it will not able to recognise

    > Thanks for help!


  • Next message: Darc Kloud: "dont understand looping problem"

    Relevant Pages

    • Re: questions of unsigned int, function prototypes
      ... >For a unsigned int used as a counter, ... Unlike signed types, the C Standard fully specifies what ... happens to overflow for unsigned integers. ... >What're purposes about using function prototypes in C? ...
      (alt.comp.lang.learn.c-cpp)
    • questions of unsigned int, function prototypes
      ... For a unsigned int used as a counter, ... overflow happen at end? ... What're purposes about using function prototypes in C? ...
      (alt.comp.lang.learn.c-cpp)
    • The Cult of a Cardinal Number
      ... On September 23 the ISS X-Force team released details of a flaw regarding ... ISS flaw introduced yet another off-by-one overflow, ... two bytes to overflow past the end of an internal buffer. ... unsigned int bufsize) { ...
      (Bugtraq)
    • [Full-Disclosure] The Cult of a Cardinal Number
      ... On September 23 the ISS X-Force team released details of a flaw regarding ... ISS flaw introduced yet another off-by-one overflow, ... two bytes to overflow past the end of an internal buffer. ... unsigned int bufsize) { ...
      (Full-Disclosure)
    • The Cult of a Cardinal Number
      ... On September 23 the ISS X-Force team released details of a flaw regarding ... ISS flaw introduced yet another off-by-one overflow, ... two bytes to overflow past the end of an internal buffer. ... unsigned int bufsize) { ...
      (Full-Disclosure)