Showing posts with label c plus plus examples. Show all posts
Showing posts with label c plus plus examples. Show all posts

Saturday, August 14, 2010

Constants

,
Definition Of Constant:-The constants in C and C++ are applicable to the values ,which do not change during the execution of a program.
There are a several type of constants in C and C++.They are Claasified into various categories are as follows:-
1.)Integer Constant
2.)Real Constant
3.)Character Constant
4.)String Constant

1.)Integer constant:-Integer constants are those who provide the numbers are either positive or negative.
Example:-const int a=5;

2.)Real Constant:-The real constants can be written in exponential notation,which contains a fractional part and an exponential part.
Example:-Const float=3.4;

3.)Character Constant:-A character constant is a single character constant.A digit,alpahabets,white space enclosed with a pair of single quote marks.
Example:-Const char ch='a';

4.)String Constants:-A String constant is a collection of characters enclosed with a pair of double quote marks.
Example:-"Anusha";







Read more →

Tuesday, June 29, 2010

What is Object Oriented Programming Language

,

What is OOP?

OOP refers to the object oriented programming which enables the feature of several new concepts by using this the programming become more easier than the conventional programming. In C++ have many features which is very useful and depend on real world entities. Some Features of OOPS Programming Languages are as follows:

1. Inheritance
2. Polymorphism
3. Data Hiding
4. Abstraction
5. Classes and Objects
6. Encapsulation
7. Dynamic Binding
8. Message Passing

Benefits of OOP

It ties data more securely to the functions that operate on it and prevents it from accidental change from external functions. Following are the impressive characteristics of OOP :-

  • Importance of data partially then functions.
  • Programs are divided into objects.
  • New data items and functions can be comfortably added whenever essential.
  • Data is private and prevented from accessing external functions.
  • Object can communicate among each other through functions.


Read more →