Friday, June 26, 2020

CHAPTER-1 INTRODUCTION OF C PROGRAMMING LANGUAGE(PART1)

First of all we should know what is language ?
 
Ans : A language is a system of communication which consists of a set of sounds and written symbols which are used by the people of a particular country or region for talking or writing. While talking to computer language i.e. programming language ,"It is a formal language that comprises a set of instructions for producing different kinds of output accordingly. "

Introduction to C Language 
  • C is a Procedural programming language. This means there will a series of statements inside a procedure (function) that needs to be carried out.
  • C is a programming language that is developed at AT & T's Bell Laboratories of USAin  1972 and it is designed and written by Dennis Ritchie.
  • C11 is the latest stable version released in 2011 December. This is supported by all major C compilers.
  • C is a middle level programming language.
  • Many other programming languages like Java, Go, C# have been heavily influenced by C.
  • C programming allows static and dynamic memory management.
  • During 1970 and 1980 many versions of C have been implemented. Hence in 1989 ANSI C was introduced and was later accepted by ISO in 1990.
  • All the C source file will be saved as .c file extension. Example “hello.c”
  • All the C header file will be saved as .h file extension. Example “stdio.h”
  • C started to replace languages of that time like PL/I , ALGOL, FORTRAN etc.
  

Features of C language:

  • Robust
  • Portable
  • Fast
  • Simple and easy to learn
  • Extensible

Why to learn C language 

There are several reasons for this. These are as follows :
  1.  Major parts of popular OS(Operating Systems) like Windows, Unix, Linux are still written in C.
  2. Embedded systems use C language. Like processors of Smart Phones, Digital cameras , Washing machines etc.
  3.  To interact with the hardware devices C is used.
  4. Different 3D computer games are still written in C (not all the codes but majority).


Disadvantages of C language:

  • Not an object-oriented language.
  • Some code needs to be recompiled when running on a different machine.
  • No constructors and destructors .
  • There is no runtime checking. An error is known only after execution of a c program.
  • There is no strict type checking. In C programming language we can send integer value for a float data type.
  • No data security is available.
NOTE: C is able to access low-level memory of hardware. This helps a programmer to develop efficient code. Hence C language is called as a middle-level programming language.







Chapter-2(part-1)

C Tokens: The smallest unit of a program and compiler identifies them as a token. Below are the types of Tokens available in C language. Key...