themboallan9
themboallan9 themboallan9
  • 10-02-2022
  • Computers and Technology
contestada

Discuss operator precedence in C programming with examples ​

Respuesta :

tonb
tonb tonb
  • 10-02-2022

Answer:

See picture for the operator precedence.

A very common pitfall is the << (shift) operator.

It has lower precedence than, for instance, the + operator, so a statement like:

int a = 3;

int c = a << 2 + 1;

will produce a different result than:

int c = (a << 2) + 1;

The first will evaluate to c = a<<3.

Ver imagen tonb
Answer Link

Otras preguntas

What is the volume of the rectangular prism? The height is 12 1/2 and the width is 8 and the length is 2
x < 4 and x > -3: I need this in interval notation please.
Some large deposits of bone have been found in mountains. True or False
An author has 18 pages to send to a publisher. The author has only small envelopes and can't fit all the pages into a single envelope. It ends up taking 6 envel
describe the layout of the rooms in the night the bed fell
How many milliliters of C5H8 can be made from 366 mL C5H12 ? density of C5H12 = 0.620 g/mL density of C5H8 = 0.681 g/mL density of H2= 0.0899g/L Please explain
Why do light refract through a prism
According to the text, what did Germans look for after world war 1? A: a powerful leader B: trade opportunities with the United States C: peaceful ways to bui
When I2 and FeCl2 are mixed together, iodine (I) cannot replace chlorine (Cl) in the compound because iodine is lower on the periodic table. true/false
What is the geometry name for PF5? Is PF5 polar or non-polar?