C Language Theory


Download:--- pdf:-- Click Here


1)   History of C language.

Ans.
  •  C  is a one type of programming  language.
  • It was developed  AT&T’S  Bell  laboratories.
  • Dennis.M.Ritchie  was the founder or father of  C language.
  •  In 1960,there were many language available but only  for specific  purpose.
  •  For example, COBOL was used for commercial applications.
  •  At that time people decided  to develop particular Language that used for all purpose.
  • There are following languages available at that time for different  type of use.

  1. 1960:- ALGOL:- International committee.
  2. 1963:- CPL:- Cambridge University .
  3. 1967:- BPCL:- Martin Richards &Cambridge University.
  4. 1970:- B:- Kent Thompson AT&T Laboratory.
  5. 1972:- C:- Dennis Ritchie at AT&T Laboratory.
  6. 1978:- K&RC:- Kernighan and Ritchie.
  7. 1989:- ANSIC:- ANSI committee.
  8. 1990:-  ISOC:- ISO committee.


2)   Write note on programming concept (C language).

Ans.
  •        Programming means “Sequence of Instructions”.
  •      The basic programming of C language is include mainly the following:-

1)Structure of program:-
  •  In C Language we can write our program with given structure only.

2) Variable declaration:-
  • We have to declare variable which can be used to store different value in the programming.

3)Conditional and looping statements:- 
  • The conditional statements are used to give condition.
  • The looping statements are used to repeat some values at the same time.

3)   Write note on Computer languages.

Ans.

   Computer languages can be of two types.

1) Low level languages
  •    Machine Languages
  •    Assembly languages


2) High level languages
   
     1) Low Level language:-

·        Low Level Language can be of two types.

(i) Machine language:-

·        Machine language is  written using Binary Language (0&1).
·        Computer can understand only low level Language.
·        So that Computer need  to convert it.

Advantages:-
  1.            It does not need converter.
  2.          Programs are small and easy.
  3.          It need less memory.

       Disadvantages:-       
  1. Programs are difficult to understand.
  2.  Programs are not portable. 
  3. Programs are hard to describe.

ii)Assembly language:-
  1.  Written is using set of Instruction.
  2.  We need Assembler to convert the code.
Advantages:- 
  1. Programs are easy to understand.
  2.  Instructions can be written using set of code.
  3.  It need less time to represent.

Disadvantages:-
  1.               We  need Assembler to translate to code.
  2.        Programs are not portable.

2)High level Language:-
  1.  High level languages are written using English statements.
  2.  Computer have to convert high level language into Low level 
  3. Language.

  Advantage:-       
  1.  Programmes are portable.
  2.  It is easy to understand.
  3. We need less time to write the program.

 Disadvantages:- 
  1. It require more memory.
  2. We need translator to convert the code.
  3.  It is compulsory to understand structure of program.
4)  Write difference between traditional c & modern c.

a  Ans.

 
Traditional c
Modern c
     It work only under unix     based  os(operating system).
     It works under different   operating system.
     In traditional C only one   program can  run at a time. 
     In    modern C more than one   program Can run at a time.
     We cannot ignore warning   messages.
     In modern C we can ignore   warning messages and can   run  the program.
     Unary operators were not applicable.
     In modern C unary operators   are easily operable.
     Comment Is not counted as   space character.
     Comment Is counted as white   space character.
  


5) Write note on C program structure.

Ans:


The C program structure means “collection of function or rules”.
C programs also support different section which can be structure of the program.

Sections :-

1)Documentation section:-

This section is used to represent name of the program and comment line.

2)Link section:-

In this section we can support different header files that used for program.

3)Definition section:-

This section is used to define pre-processor directive.
1)#include                                                           
     2)#define

4)Global Section:-

This section can be used to declare global variables.

5)Main ():-

It is the first function in every c program from where program execution will be start.

6)Sub program:-


This section contains user define function.


Download:--- pdf:-- Click Here