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 7841171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:02:43+00:00 2026-06-02T16:02:43+00:00

Studying C conversions I found a paragraph about Integer promotions that I haven’t understand

  • 0

Studying C conversions I found a paragraph about Integer promotions that I haven’t understand very well, it says:

"Integer types smaller than int are promoted when an operation is performed on them. If all values of the original type can be represented as an int, the value of the smaller type is converted to an int; otherwise, it is converted to an unsigned int"

Considering that:

  1. the rank of any unsigned integer type is equal to the rank of the corresponding signed integer type

  2. The rank of long long int is greater than the rank of long int, which is greater than the rank of int, which is greater than the rank of short int, which is greater than the rank of signed char.

the questions are:
Why a type smaller than int should not be represented by an int?
and why an unsigned int could represent a value that an int should not represent?

Thanks in advance.

  • 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-06-02T16:02:44+00:00Added an answer on June 2, 2026 at 4:02 pm

    Although a short has lower rank than an int, it could be the same size (in bits), e.g. sizeof(int) == sizeof(short) == 2 on 16 bit systems. So an unsigned short may be able to hold a value greater than INT_MAX.

    For the second part of your question, which has much the same answer: an unsigned int can hold values that can not be represented as an int, i.e. INT_MAX+1 .. UINT_MAX.

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

Sidebar

Related Questions

i studying TDateTime functions and procedure, but not found something that allow me to
Studying C#, my books are showing me classes for readin files. I've found 2
While studying about JMX, I have seen one of the important feature of it
While studying the Collection API, we find that some methods ( add , remove
I'm studying for the 70-536 exam and now I'm checking the lesson about converting
While studying the book Introduction to Algorithms by Cormen, I found a strange thing.
I am studying about various trees, and came across AVL trees and splay trees.
When studying Java I learned that Strings were not safe for storing passwords ,
I studying grammars and am a bit confused about how to design grammars where
I was just studying OCPJP questions and I found this strange code: public static

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.