click on this link......

LinkGrand.com

Friday, 7 December 2012

Introduction to C language

  • C is a programming language developed at AT & T's Bell Laboratories of USA in 1972.
  • It was designed & written by Dennis Ritchie.
Computer program: 
A computer program is a set of instructions given to the computer to solve a problem.


Computer programming Language:
It is a language in which a computer program is written. 
eg. C, C++, Java.

Compiler:
A compiler is a ready made computer program written in a computer programming language into the language that computer understands.
i.e. ON (1) and OFF  (0)

Turbo C Compiler:
TC is also called an Integrated Development Environment (IDE). Since TC compiler not only converts a program written in C language into MLL (Machine level language) but also provides an environment to :
  • Create new files
  • Open existing files
  • Save the files
  • Make changes in files.  
Steps to start TC:
  1. Start your computer
  2. Switch from windows OS to DOS (Disk Operating System).
  3. Change to the TC directory. CD/TC/BIN
  4. Stary TC. TC
  5. Maximize the window. Alt + enter.
steps to exit from TC:
  1. From the menu, select File -> Quit
  2. To exit from window type 'exit'.
    
Steps in learning English language:-

Alphabets -> words -> sentences -> paragraphs

Steps in learning C language:-

Alphabets         Constants         
Digits          ->  Variables   -> Instructions -> Program
Special               Keywords
Symbols
C Constants:-
  1. primary constants:
    1. Integer constants
    2. Real Constant
    3. Character constants
  2. Secondary Constants:
    1. Arrays
    2. pointer
    3. structure
    4. union
    5. Enum
* Integer constants-
  • It must not have a decimal point.
  • It may be positive or negative.
  • eg. 426, 782, -8000,-7605.

* Real constants-
  • Real constants are often called floating point constants.
  • It must have a decimal point.
  • It may be positive or negative.
  • Eg. +325.34, 426.0, -48.5792
  • Real constants can be expressed in two forms i.e. fractional or exponential.
* Exponential form-
  • Real constants is expressed in two parts.
  • The part appearing before e is called mantissa, whereas the part following e is called exponent.
  • Thus 0.000342 can be expressed in exponential form as 3.24 e-4.
  • Eg. +3.2 e-5
  • we may use e or E.
* Character constants-
  • Eg. 'A','I','5','='
  • The inverted commas should point towards left.









No comments:

Post a Comment