answersLogoWhite

0


Best Answer

The preference in which arithematic operations are performed in an arithematic expression is called as Hierarchy of operations.

Its very important in C Programming to predefine the Hierarchy of operations to the C compiler in order to solve the given arithematic expression correctly.

e.g.: If a programmer wishes to perform ,z=a+b/c;it may beinterpretedas z=(a+b)/c or z=a+(b/c).

and if a=3,b=6,c=2 then using the same expression we will obtain two differentanswersas z=4.5 or z=6.

To avoid this condition we must be aware of hierarchy of operations used in C programming.

In arithematic expressions scanning is always done from left to right.

The priority of operations is as shown below,

Priority

Operators

First

Parenthesisos brackets()

Second

Multiplication & Division

Third

Addition & Subtraction

Fourth

Assignment i.e.=



If we consider the logical operators used in C language,the operator precedence will be like;



Operators

Type

!

Logical NOT

* / %

Arithmetic and moulus

+ -

Aritmetic

Relational

== !=

Relational

&&

Logical AND

Logical OR

=

Assignment



In the tables above,the higher the position of an operator,higher is its priority.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What do you mean by Hierarchy in C language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do you mean by c language?

C is a programming language.


What do you mean by c?

c is a programing language


Why C language is p?

C language is not p actually. Of course it might depend on what do you mean by 'p'.


What is expressivepower of a language in automata theory?

What is expressive power of a language in automate theory is a language Hierarchy


What does hierarchy mean in drama terms?

hierarchy is structure and flow of authority.


C what does it mean?

Hundred Carbon A vitamin A programming language ...


What are the colors in C programming language?

What exactly do you mean by colors?


What is the mean of echoed in c language?

It has nothing to do with C-language, it simply means that when you press a key representing a character, the character appears on the screen.


What is linguistic hierarchy?

Linguistic hierarchy refers to the organization of language elements based on their level of abstraction or complexity. It involves the classification of linguistic units, such as phonemes, morphemes, words, phrases, and sentences, according to their role and position within the language system. Understanding linguistic hierarchy helps linguists analyze the structure and rules of a language.


What do you mean by c taken programming in c?

A C program is a computer program written using the C programming language.


Why c language has name c why not a?

C-language was derived from B-language.


Which is the most suitable language for computer software?

It depends on what you mean by suitable. Assembly language is generally the best in terms of performance, but C and C++ are more practical to use.