NOTES
NOTES
Programming paradigm NOTES Paradigm means organizing principal of a program. It is an approach to programming. Different programming paradigm  Procedural programming:-In procedural Program the emphasis is on doing things rather data. Following focus points about procedural programming:-  Emphasis is on doing things.  Global data is loosely available to all function.  There is no data security.  Procedural oriented approach does not model real world problem.  It does not encourage reusability of code.  C --supports Procedural Programming  Modular Programming:-Large Program is broken down into smaller units i.e., function (sub Program). The idea of breaking a into function can further be extended by grouping a number of functions together into a larger entity called a module.  Object oriented Programming:- Object oriented Programming paradigm is based on the principal of data hiding, abstraction, inheritance and polymorphism. It implements Programs using classes and objects. It supports reusability of code so it is very close to real world. Data and function are encapsulated to ensure data safety and security.
History of C Language  The C programming language was designed by Dennis Ritchie at Bell Laboratories in the early 1970s.  It derived from a computer language named B and from an earlier language BCPL. As the language further develop and standardized a version known as ANSI(American National Standard institute) C became dominant This language was originally designed and implemented on the UNIX operating system on DEC – PDP11 by Dennis Ritchie at bell labs and entire UNIX was written in C. Features of Language C  It is Middle LEVEL Languages.  It is procedural program.  It is case sensitive it treats upper and lowercase differently.  C Language uses Compiler for translation.  It learns basic programming skills. NOTES
EXTRA
NOTES
EXTRA
OR Preprocessors EXTRA
PREPROCESSING AND STANDARD LIBRARIES It is the directives written in a program. It is always before the main(). It does not terminated by semicolon sign. Most useable when our program are more Larger and has to managed multiple files. # EXTRA
OR Preprocessors EXTRA
OR Preprocessors EXTRA
Stdio.h String.h math.h Stdlib.h Scanf () strlen() Printf( strcpy() gets() strcmp() puts() strcpy() getchar() strcat() putchar() sin() cos() pow() SQRt() tan() exp() log() malloc() realloc() abs() free()
FILE INCLUSION #include<filename> #include “filename” is also permitted EXTRA •A Filename written in < > is searched in its standard library. •A Filename in “ “ is searched first current directory and if not found will then be searched in the standard directory .
COMPILER CONTROL DIRECTIVES •This is the need of developing large programs and to make the code portable to more than one specific type of condition. •The control may change the execution path depending upon the current environment. NULL DIRECTIVE # -> has no effect. EXTRA
NOTES
NOTES
NOTES
NOTES
NOTES
NOTES

C programming basics

  • 2.
  • 3.
  • 4.
    Programming paradigm NOTES Paradigm means organizing principal of a program. It is an approach to programming. Different programming paradigm  Procedural programming:-In procedural Program the emphasis is on doing things rather data. Following focus points about procedural programming:-  Emphasis is on doing things.  Global data is loosely available to all function.  There is no data security.  Procedural oriented approach does not model real world problem.  It does not encourage reusability of code.  C --supports Procedural Programming  Modular Programming:-Large Program is broken down into smaller units i.e., function (sub Program). The idea of breaking a into function can further be extended by grouping a number of functions together into a larger entity called a module.  Object oriented Programming:- Object oriented Programming paradigm is based on the principal of data hiding, abstraction, inheritance and polymorphism. It implements Programs using classes and objects. It supports reusability of code so it is very close to real world. Data and function are encapsulated to ensure data safety and security.
  • 5.
    History of CLanguage  The C programming language was designed by Dennis Ritchie at Bell Laboratories in the early 1970s.  It derived from a computer language named B and from an earlier language BCPL. As the language further develop and standardized a version known as ANSI(American National Standard institute) C became dominant This language was originally designed and implemented on the UNIX operating system on DEC – PDP11 by Dennis Ritchie at bell labs and entire UNIX was written in C. Features of Language C  It is Middle LEVEL Languages.  It is procedural program.  It is case sensitive it treats upper and lowercase differently.  C Language uses Compiler for translation.  It learns basic programming skills. NOTES
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
    PREPROCESSING AND STANDARDLIBRARIES It is the directives written in a program. It is always before the main(). It does not terminated by semicolon sign. Most useable when our program are more Larger and has to managed multiple files. # EXTRA
  • 11.
  • 12.
  • 13.
    Stdio.h String.h math.hStdlib.h Scanf () strlen() Printf( strcpy() gets() strcmp() puts() strcpy() getchar() strcat() putchar() sin() cos() pow() SQRt() tan() exp() log() malloc() realloc() abs() free()
  • 14.
    FILE INCLUSION #include<filename> #include “filename” is also permitted EXTRA •A Filename written in < > is searched in its standard library. •A Filename in “ “ is searched first current directory and if not found will then be searched in the standard directory .
  • 15.
    COMPILER CONTROL DIRECTIVES •This is the need of developing large programs and to make the code portable to more than one specific type of condition. •The control may change the execution path depending upon the current environment. NULL DIRECTIVE # -> has no effect. EXTRA
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.