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 happens during periods of hyperinflation
In what way did the illiteracy of the Anglo-Saxon period affect literature?
The way of life in 1850 in the north
Solar cells ____ collect Sun energy and convert it to electricity.
A square has sides of length s A rectangle is 6 inches shorter and 8 inches wider than the square. Express the area of the rectangle as a polynomial.
What was zheng he's most important accomplishment
When converting from kilometers to meters, the decimal is moved _______.
Directions: Select all the correct answers.Which two sentences use correct punctuation? "Since the holiday sale has begun today," said Sarah, "I will go
23.6-2*3^0 divided by 2
six more than two time a certain number is less than the number increased by twenty.