Ticker

6/recent/ticker-posts

Full C programming Part -1

                                                       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

  1. Start and end :-
  2. process / Declarction
  3. Input / output :-
  4. Decision  (or) Test condition
  5. flow lines ;- denotes the beginning or end of program.
Ex.


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)

C- language : - -  
  • A high level programming language is caued C- language.
  • c- language is also known as prodedure oriented language
Translator :- It can be translate source code into object code

Type of translator :-
  1. 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..
  2. 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.
  3. Assembler :- 
  • it is used in assembly language programming to translate memonic codesinto object codes.
  • Generally memonic codes are used assembler language.
Programming rules :- 
  1. Every program must have a main() function.
  2. every statement must terminate with ; except control statements.
  3. Executable part must follows the declaration part.
  4. Numer of opening braces must be balance with number of closing braces.
Tokens :- In a passage of test, individual characters and punctuation mark are called tokens. Same as in C - program indiviidual characters words etc are caued c-tokens.

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)
(2) Constant :- Constant in C are applicable to the values, which do not change during the program execution.
 
 

     




Post a Comment

0 Comments