Skip to main content

Basic Knowledge About Instructions and Operators in C Language.

Basic Knowledge About Instructions and Operators in C Language. 

        A Program is nothing but a set of instructions. The program behaves as per the instructions that we give in it. Different instructions help us achieve different task in a program.  

                In this article, we learn about Instruction, type of Instructions, Hierarchy of Operations and Associatively of Operators.


a)      Type Declaration instructions :-

This instruction is used to declare the type of the variable being used in the program. Any variable used in the program must be declared before it is used in any statement. The type declaration statement is written at the beginning of main () function.

 Ex. Int  bas;

Float rs, grosssal;

Char name, code;

a)      Arithmetic instructions:-

 Arithmetic instruction in C consists of a variable name on the left-hand side of = and variable name and constants on the right-hand side of = the variables and constants appearing on the right-hand side of = are connected by arithmetic operators like +,-,*,/.



Hierarchy of Operations

The priority or precedence in which the operations are performed is called the Hierarchy of Operations.

The hierarchy of commonly used  operators is shown as follow

Associatively of Operators.

When an expression contains two operators of equal priority, the tie between them is settled using the associatively of the operators. All operators in c have either left to right associatively or right to left associatively.

a)      Control Instructions:-

 As the name suggests, the ‘control instructions’   enable us to specify the order in which the   various  instructions in a program are to be   executed by the computer. In other words, the   control instructions                                                         determine the ‘flow of control’ in a program.


Comments

Popular posts from this blog

How To Know Best Tools For Social Media Marketing Part 2

  Best Tools For Social Media Marketing Part 2 Today we will tell you about social media marketing tools Part 2. in this article remaining 6 tools, which are helping in a social media campaign. Unsplash: - It is very important to have amazing images while having high-quality textual content. Unsplash provides a database of high-resolution, great images that you can use with your posts, the fact that a good image has its own unique significance cannot be denied. Each image is properly tagged so that you can find the most appropriate image for your post. Marin: - If your agency runs a social media advertising campaign (campaign), then this social media management tool will be useful for you. Marin offers a range of features that promise to increase your ROI by up to 30% compared to native equipment. One of its cool features is called auto-split which helps your audience in the micro-segment. Nimble: - As your customer list grows, a powerful CRM is needed to automate data manag...