Monday 29 October 2012

C Program To Print The Fibonacci Series

By
The Sample Output of this Program is Shown Below.
Values above 32,767 will not displayed Properly it return random negative number.This happens due to limitations in Size of Datatypes.Here we are Declaring our variables as a integer datatype.the size of integer datatype is 32 KB its ranges from -32,768 To +32,767.If you wanna to avoid this limitation use different data type.


           Data Type     Bytes             Range
***********************************************************************************
            short int           2          -32,768 TO +32,767                          (32kb)
   unsigned short int     2                0 TO +65,535                              (64Kb)
         unsigned int        4                0 TO +4,294,967,295                   ( 4Gb)
                  int              4   -2,147,483,648 TO +2,147,483,647          ( 2Gb)
             long int           4   -2,147,483,648 TO +2,147,483,647           ( 2Gb)
          signed char        1             -128 TO +127
        unsigned char      1                0 TO +255
***********************************************************************************
     


0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Labels