C - Language
Algorithm : A finite set of stps that provide a chain of actions for solving a problem .
- It is the step by step solution to given problem
Ex.:-
step 1 : Start
Step 2 : Take three variables a,b,c
Step 3 : Read values for a,b
Step 4 : c = a + b
Step 5 : print c
Step 6 : stop
Flowchart : A flow chart is a visual representation of the sequence of steps for solving a problem.
Commonly used symbols in flow charts is
- Start and end :-
- process / Declarction
- Input / output :-
- Decision (or) Test condition
- flow lines ;- denotes the beginning or end of program.
Programming language ;-
which language ,we are using to develop programs that particular language is caued programming language.
Program ; -
A Coollection of statements or a set of instruction is caued a program.
source code :
which is uderstandable by the computer is caued object code i.e 0's and 1's (Binary code)
which is uderstandable by the computer is caued object code i.e 0's and 1's (Binary code)
C- language : - -
- A high level programming language is caued C- language.
- c- language is also known as prodedure oriented language
Type of translator :-
- Compiler :- it is used to translate source codee to object code whole program at a same time and displays errors if (any) at bottom of the screen. compilers are used in C,C++ etc..
- Interpreter :- it is used to translate to s.c to o.c line by line (or) line at a time .the disadvaantage is it takes more time to compile.
- Assembler :-
- it is used in assembly language programming to translate memonic codesinto object codes.
- Generally memonic codes are used assembler language.
- Every program must have a main() function.
- every statement must terminate with ; except control statements.
- Executable part must follows the declaration part.
- Numer of opening braces must be balance with number of closing braces.
C- tokens ;-
(1) Character set :-
- Characters are used to form words numbers and expressions.
- characters are divided into 4 types.
- (i) Letter (a-z & A-Z)
- (ii) Digits (0-9)
- (iii) Symbols & special characters ( @,$,-,+,*,etc...
- (iv) White spaces (blank space, vertical tab ,horizontaltab)
0 Comments