BASIC THEORY OF C LANGUAGE
● What is C (language) ?
● Language:-
'C' Language Set Contain basic, element further to be used to develop a 'c' program.
Like : 》A, B, C ............. Alphabets (Capital letter).
》0, 1 ............... 9 Digits (Numbers).
》a, b, c ............ z alphabets (Small letter).
》Alpha Numberals.
》Special Symbol ( ) ; " , # etc.
● Tokens • • •
Tokens are unit words of 'C' .
It is very much lite to words as in English .
There are Five types of Tokens:-
1. Identifiers
2. Keywords
3. Operators
4. Constant
5. Variables
.....................................................................
Identifiers :- When we identify some words are unit words at 'C' Programming used to identify new entities to be used in 'C' Programming.
These are user define Tokens.
Example :- Sum N1, add.
Keywords :- Keywords are reserved word of 'C' Programming with there Standard and Pre-defined meaning in the 'C' like library.
Example :- Printf, if else etc.
Operators :- Operators operates on oprends produce some oprends output. A+B Operators.
Example :- (+) (-) (÷) (×) etc.
Constant :- An Constant is the value that can be store under a variable name.
Variable :- Variable is nothing but a name to some memory location where a new value can be store.
(A) - Variable
(B) - Constant
1002 - Address
Memory
● Instruction :
Instruction is to create established a communication a program why a that a user can entract with the computer.
As we known that if we want to communication with the computer than we need a language that is understandable to the user as well as to the computer.
1. Declarative Instruction
2. Input / Output Instruction
3. Assignment Instruction
4. Arithmetic & Logical Instruction
5. Control Instruction.
.....................................................................
Declarative Instruction are used to declare new entities further to be used to develop a 'C' program suppose we add two number the declaration should to like to as :- A, B, S
N1, N2 Sum.
Input are used for supplying values to the variables as declared by decorative instructions.
Static A = 10
B = 20
Dynamic for input - Scanf( )
For Output = Scanf( )
Assignment Instruction are used to assign the value to corresponding variables.
A = 10
If we can assign the values to the variables within its declaration.
Arithmetic or Logical Instruction are used to perform the A/L Operation on the variables as used in Declarative and Input / Output Instruction C = A + B ;
int N1 N2 N3 Sum ; A = 10
B = 20
Sum = N1 + N2 + N3 ;
Control instructions are used to control the flow of execution ( instruction must be executed in the same as they prefer) of the program.
Snytax Of C :-
# :- Preprocessor Directive
Stdio :- Standard Input Output
Conio :- Console Input Output
#include<stdio.h>
#include<conio,h>
Void main()
{
Statement Printf(" ") :- output
Scanf(" ") :- input
}
-----------------------------------------------------------------------------------------------------------------------------
#include<stdio.h>
#include<conio,h>
Void main()
{
Printf(" BYOMKEH THAKUR ");
getch();
}
OUTPUT
BYOMKESH THAKUR
-----------------------------------------------------------------------------------------------------------------------------