C Language

Introduction to c

Objective :-
  1. Why C language is so important ?
  2. History of C language
1.) Why C language is so important :-
  -> Oracle is written in C
  -> Core libraries of android are written in C
  -> MySql is written in C
  -> Almost every device driver is written in C
  -> Major part of web browser is written in C
  -> Unix operating system is developed in C
  -> C is the world most popular programming language
  -> C is important to build programming skills
 2.) History of C language :-
-> Developer of BCPL(Basic Combined Programming Language) is

     (Martin Richards) developed by in 1966.
-> Developer of B language is (Ken Thompson)
-> 1969
-> Also developer of Unix operating System.
-> He also developed first master level chess called (Belle) in
     1980
-> Developer of C language is (Dennis Ritchie).
-> in 1972
-> At AT & T’S Bell labs , USA
-> Co-developer of Unix Operating System.      
Identifiers in C :-
Identifiers :-

1.Constant
2.Variable
3.Keywords

Constants:-

-> Any information is constant
-> Data = Information = Constant

Types of Constant:-
  1. Primary Constant.
  2. Secondary Constant.

1.) Primary Constant :-
  -> Integer
  -> Real
  -> Character
2.) Secondary Constant :-
  -> Array
  -> String
  -> Pointer
  -> Union
  -> Structure

  -> Enumerator
Variable :-
  -> Variables are the names of memory locations
       where we store data.
Rules :-
  -> Variable name is any combination of alphabets , digit and
       underscore.
  -> A valid variable name cannot start with digit.

  Instructions :-
1.Data type declaration Instruction.
2.Input Output Instruction.
3.Arithmetic Instruction.
4.Control Instruction.

1.) Data type Declaration Instruction :-
  a) Data type :-

    -> int

    -> char

    -> float

    -> double

    -> void

  b) Declaration Statement :-

    int  a , b=5;

    float k;
   
2.) Input Output Instruction :-
a)Standard input output Device:
  -> Keyboard is standard input device.
  -> Monitor is standard output device.
b)printf() :
  -> printf() is not a keyword.
  -> printf() is a predefined function.
c)Program:
  -> main(){
  printf(“manu dhaker”);
  }
d) output:
  -> manu dhaker
3.) Arithmetic instruction :

-> An instruction which is used to manipulate data using operators is
     known as arithmetic instruction.
-> There is no BODMAS in c.
-> 3 + 4 * 5
-> Ans : 35 is wrong and 23 is right
-> here 3 , 4 and 5 are operands and + and * are operators.
Type of operators :
  1. Unary Operator

  2. Arithmetic Operator  

  3. Bitwise operator

  4. Relational Operator

  5. Logical operator

  6. Conditional operator

  7. Assignment operator 

Comments

Popular posts from this blog

C++ Language

C Language

Java Language