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

  • Home
  • SEARCH
  • 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 8930469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:54:01+00:00 2026-06-15T08:54:01+00:00

Would I be correct to say that the underlying object representation (bit pattern) in

  • 0

Would I be correct to say that the underlying object representation (bit pattern) in each of the following definitions is the same?

char c = 240;
unsigned char c = 240;
signed char c = 240;

So, the signed-ness matters only when c is used in an expression (or casts)?

  • 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-15T08:54:02+00:00Added an answer on June 15, 2026 at 8:54 am

    In general case it is not correct to say that the pattern is the same, if the range of signed char does not cover 240. If 240 is out of range, the result of this overflowing initialization is implementation-defined (and may result in a signal, see 6.3.1.3/3). The same applies to char initialization if it is signed.

    The language guarantees matching representations only for the common part of the ranges of signed char and unsigned char. E.g. this is guaranteed to produce the same pattern

    char c = 10;
    unsigned char c = 10;
    signed char c = 10;
    

    With 240 there’s no such guarantee in general case (assuming it is out of range).

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

Sidebar

Related Questions

Would it be correct to say that whenever casting is used, the resulting object
Would it be correct to say that if 'print' is not listed as one
Would this be the correct way of declaring that an XML element Cluster contains
I would have dared say that the numeric values computed by Fortran and C++
I always wonder if it's correct to say that something like THIS is a
Say that I have the following code: function testA { setTimeout('testB()', 1000); doLong(); }
First, I would like to say that this is for a homework assignment and
Is it correct to say that the .Net platform is more secure because the
Am I correct to say that JavaScript code isn't compiled, not even JIT? If
How would you correct way to handle an exception in this situation? Initially I

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.