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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:42:55+00:00 2026-06-13T08:42:55+00:00

Why does & exist? My book tells me that & will check for both

  • 0

Why does & exist? My book tells me that & will check for both conditions to be false even if the first one is false, but it is pointless checking if the second condition is false anyway because the first will always make the entire thing false if it is false.

  • 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-13T08:42:56+00:00Added an answer on June 13, 2026 at 8:42 am

    && is the “boolean AND” operator. It evaluates to true if both its operands are true, and false otherwise. It only evaluates the second term if the first is true, because that’s a useful optimization.

    & is the “binary AND” operator. It evaluates to the result of applying a bitwise AND operation to its operands. The type of this value is the same as the type of the operands, which can be any integral type or bool. It always evaluates both of its operands.

    For boolean operands, the only real practical difference between & and && is that the first always evaluates both operands, while the other performs a short-circuit evaluation.

    For integral operands, only the & operator can be used, of course. Example of a bitwise AND on integers:

    17 & 13 == 1
    

    This is because 17 is 10001, bitwise, 13 is 1101. So the operation is:

       10001
     & 01001
    --------
       00001
    

    The same applies to the binary and boolean OR operators (| and ||).

    The binary & operator can also function as a unary operator, where it returns the address of the variable it is applied to, as in C. This is can only be used in unsafe code. Example:

    unsafe {
       int a = 3;
       int* addressOfA = &a;
    }
    

    Hopefully that clears things up a bit.

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

Sidebar

Related Questions

Does it always happen that stack always grows downwards & heap grows upwards? If
If the &view-all parameter does NOT exist in the URL I need to add
I feel like I am writing something that should already exist. Does Django have
Does such feature exist? Something like Java HotSpot running in server mode, but for
What's the best practice for retrieving JSON values that may not even exist in
I'm trying to create a Linq statement that queries both columns that exist on
For some reason in my where it says that firstname does not exist in
Method UiInstance.getElementById(ID) always returns GenericWidget object, even if ID does not exist. Is there
Does a && (b = 5/a) assign 5/a to b (for nonzero a )?
Possible Duplicate: What does map(&:name) mean in Ruby? What does the &:valid? found in

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.