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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:38:29+00:00 2026-06-17T09:38:29+00:00

Relizing there’s no such thing as a BOOL datatype, take the following: std::cout <<

  • 0

Relizing there’s no such thing as a BOOL datatype, take the following:

std::cout << (1>2); //<<-- prints 0

Assuming this false comparison is a 0, what datatype deos the result of a comparison reduce to? Doing a quick google search doesn’t yield any results. My best guess it that it’s an unsigned char because it’s the smallest most basic datatype where 0 truly represented as 0x00. I don’t want to assume anything because I’m not sure what voodoo std::cout does to the value to make it a printable character.

  • 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-17T09:38:29+00:00Added an answer on June 17, 2026 at 9:38 am

    The type of the result of all relational operators (<, >, <=, >=) is bool:

    The operators < (less than), > (greater than), <= (less than or equal to), and >= (greater than or equal to) all yield false or true. The type of the result is bool.

    An object of type bool has the values true or false.Under integral promotion, a bool can be converted to an int where false becomes 0 and true becomes 1:

    A prvalue of type bool can be converted to a prvalue of type int, with false becoming zero and true becoming one.

    bool is an integral type, which the standard says are represented by use of a “pure binary numeration system”. The footnote that describes this representation is fairly unclear as to how it maps to the values true and false, but you could assume that they are implying that the value representation for 0 would be all 0 bits:

    A positional representation for integers that uses the binary digits 0 and 1, in which the values represented by successive bits are additive, begin with 1, and are multiplied by successive integral power of 2, except perhaps for the bit with the highest position. (Adapted from the American National Dictionary for Information Processing Systems.)

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

Sidebar

Related Questions

Is there any way to make std::vector faster on reserving + resizing ? I
I want to disable column resizing in Flexigrid. Is there any option like colresize:false/true
I created this image resizing plugin last night.The problem is if there is only
I realize there a many questions relating to this issue, however i have not
Is there any way to stop the user resizing the form? Currently I am
I was wondering if there was to fire an event upon the resizing of
is there any javascript library for resizing the images according to browser window sizes
Is there some script (better if php), which can do some operations like? resizing
There is many algorithms to do image resizing - lancorz, bicubic, bilinear, e.g. But
PIL is great for resizing an image 99% of time. But as there are

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.