Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 545477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:45:55+00:00 2026-05-13T10:45:55+00:00

What is the function to determine the min and max possible of value of

  • 0

What is the function to determine the min and max possible of value of datatypes (i.e, int, char.etc) in C?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:45:56+00:00Added an answer on May 13, 2026 at 10:45 am

    You’ll want to use limits.h which provides the following constants (as per the linked reference):

    SCHAR_MIN      : minimum value for a signed char
    SCHAR_MAX      : maximum value for a signed char
    UCHAR_MAX      : maximum value for an unsigned char
    CHAR_MIN       : minimum value for a char
    CHAR_MAX       : maximum value for a char
    SHRT_MIN       : minimum value for a short
    SHRT_MAX       : maximum value for a short
    USHRT_MAX      : maximum value for an unsigned short
    INT_MIN        : minimum value for an int
    INT_MAX        : maximum value for an int
    UINT_MAX       : maximum value for an unsigned int
    LONG_MIN       : minimum value for a long
    LONG_MAX       : maximum value for a long
    ULONG_MAX      : maximum value for an unsigned long
    LLONG_MIN      : minimum value for a long long
    LLONG_MAX      : maximum value for a long long
    ULLONG_MAX     : maximum value for an unsigned long long
    PTRDIFF_MIN    : minimum value of ptrdiff_t
    PTRDIFF_MAX    : maximum value of ptrdiff_t
    SIZE_MAX       : maximum value of size_t
    SIG_ATOMIC_MIN : minimum value of sig_atomic_t
    SIG_ATOMIC_MAX : maximum value of sig_atomic_t
    WINT_MIN       : minimum value of wint_t
    WINT_MAX       : maximum value of wint_t
    WCHAR_MIN      : minimum value of wchar_t
    WCHAR_MAX      : maximum value of wchar_t
    CHAR_BIT       : number of bits in a char
    MB_LEN_MAX     : maximum length of a multibyte character in bytes
    

    Where U*_MIN is omitted for obvious reasons (any unsigned type has a minimum value of 0).

    Similarly float.h provides limits for float and double types:

    FLT_MIN    : smallest normalised positive value of a float
    FLT_MAX    : largest positive finite value of a float
    DBL_MIN    : smallest normalised positive value of a double
    DBL_MAX    : largest positive finite value of a double
    LDBL_MIN   : smallest normalised positive value of a long double
    LDBL_MAX   : largest positive finite value of a long double
    FLT_DIG    : the number of decimal digits guaranteed to be preserved converting from text to float and back to text
    DBL_DIG    : the number of decimal digits guaranteed to be preserved converting from text to double and back to text
    LDBL_DIG   : the number of decimal digits guaranteed to be preserved converting from text to long double and back to text
    

    Floating point types are symmetrical around zero, so the most negative finite number is the negation of the most positive finite number – eg float ranges from -FLT_MAX to FLT_MAX.

    Do note that floating point types can only exactly represent a small, finite number of values within their range. As the absolute values stored get larger, the spacing between adjacent numbers that can be exactly represented also gets larger.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's trivial to write a function to determine the min/max value in an array,
Possible Duplicate: Determine original name of variable after its passed to a function. I
Possible Duplicate: Php function to determine if a string consist of only alphanumerical characters?
In a template function, I like to determine the range for the value of
Im having this function to determine weather a user exists in a database or
I need a function to determine if a directory is a mount point for
Example: /** * This function will determine whether or not one string starts with
I want to make a function to determine if a user, whose ID is
I am trying to write a function to determine if a string is a
I'm looking for some function to determine opening and closing virtual keyboard on samsung

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.