What is Instructions in C - Ishwaranand


What is Instructions in C

Instructions in C

Q) What do you mean by instruction in C? What are different types of instructions? Explain each of them with example.

Instruction of Instructions in C

  • A statement written in C program is known as instruction. It can also be defined as the command of a task given to the computer.
control instructions in c, type declaration instruction in c, c instruction set, inputoutput instructions in c, arithmetic instructions in c, online c compiler, data types in c, what the instruction void when written in c program means, how does the instruction end in c?, input/output instructions in c, control instructions in c, hierarchy of operations type conversion, arithmetic instructions in c, what is program, online c compiler, quick revision of c programming pdf, c programming links, c programming useful resources, sample questions of c programming, subjective questions on c programming,
Image Source ~ Crafted With ©Ishwaranand - 2020 ~ Image by ©Ishwaranand

Type of instruction

  • There remain basically three types of instructions into C:
  1. Type declaration instruction
  2. Arithmetic instruction
  3. Control instruction

Type declaration instruction

  • The instruction is used to declare the type of the variable being used in the program. Each variable used in the program must equal declared before using it in any statement.
  • The type declaration statement is written at the beginning of a main() function.

void main()
 int age;
float price = 10.5;
int j = 10, j = 20;

Arithmetic instruction

  • Here instruction is done to perform arithmetic operations.
  • The C arithmetic instruction consists of a variable name on the left-hand side of = and arithmetic expression on the right-hand side of=
  • The variable and constants appearing on the right-hand side of= are connected by arithmetic operators like+,-,* and /.
c = a * b + 5. 5 / 2;

Control Instruction

  • Because some name suggests the 'control instructions enable us to specify the order within which the various instructions in each program are to be executed by the computer.
  • During other words, some control instructions determine the specific flow of control in a program. There are four types of control instruction in C.

They are Control Instruction:

  1. Sequence control instruction
  2. Selection or decision control instruction (if-else)
  3. Repetition or loop control instruction  (While, do-while, for)
  4. Case-control instruction  (switch case)

No comments

Comment on Ishwaranand or Happy Day
Not, Add any types of links