Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about logical-and

Read more about logical-and

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - logical-and

Why is the expression true after bit shifting the value and condition with && in C

Have a look at the example: unsigned char c = 64; /* 0100 0000 */ c = (c << 2 && 512); /* 512: 10 0000 0000 */ If I shift c two times to the left, I should get from 0100 0000 (64) to t...
test-img

B0r1

c

logical-operators

bit-shift

integer-promotion

logical-and

Votes: 0

Answers: 3

Latest Answer

From the C Standard (6.5.7 Bitwise shift operators) 3 The integer promotions are performed on each of the operands. The type of the result is that of the promoted left operand. So in this expression...
test-img

Vlad from Moscow

Why does it display the sum if numbers aren&#39;t between the 2 values?

I want it to not display the result of the sum if the numbers are lower or equal to 1 or 1000. I don't know if using if is the best way, but that's what I tried using, and I don't really understand wh...
test-img

NickPG44

c++

if-statement

constraints

logical-and

relational-operators

Votes: 0

Answers: 3

Latest Answer

The expression in this if statement if ( 1 <= a, b, c <= 1000) is an expression with the comma operator. It is equivalent to if ( ( 1 <= a ), ( b ), ( c <= 1000 ) ) and the value of the ...
test-img

Vlad from Moscow

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved