OOP and C Language
OOP and C Language
Why OOP?
The main advantage of OOP is better manageable code that covers
following.
1) The overall understanding of the software is increased as the
distance between the language spoken by developers and that
spoken by users.
2) Object orientation eases maintenance by the use of
encapsulation. One can easily change the underlying representation
by keeping the methods same.
What is encapsulation?
Encapsulation is referred to one of the following two notions.
1) Data hiding: A language feature to restrict access to members of an
object. For example, private and protected members in C++.
2) Bundling of data and methods together: Data and methods that operate
on that data are bundled together.
What is Abstraction?
The first thing with which one is confronted when writing programs is the
problem. Typically we are confronted with “real-life” problems and we want
to make life easier by providing a program for the problem. However, real-
life problems are nebulous and the first thing we have to do is to try to
understand the problem to separate necessary from unnecessary details:
We try to obtain our own abstract view, or model, of the problem. This
process of modeling is called abstraction.
C Language
3. What is a compiler?
Compile is a software program that transfer program developed in high
level language intoexecutable object code.
4. What is IDE?
The process of editing, compiling, running and debugging is managed by a
single integrated application known as Integrated Development
Environment (IDE).
5. What is a program?
A computer program is a collection of the instructions necessary to solve a
specific problem.
6. What is an algorithm?
The approach or method that is used to solve the problem is known as
algorithm.
7. What is structure of C program?
A C program contains Documentation section, Link section, Definition
section, Global declaration section, Main function and other user defined
functions.
9. What is a Keyword?
Keywords are building blocks for program statements and have fixed
meanings and these meanings cannot be changed.
13. What are the Back Slash character constants or Escape sequence
characters available in C?
Back Slash character constant are \t, \n, \0.