Wednesday, October 13, 2010

Graphics in C Language Tutorial

,
C and C++ Very Useful Language for Creating Application and programs. It provide a platform for developing a application with many functionality. But we know that mostly users attract Interface design. Design of application gives easy to use for users, he can user any application easily by UI. All programmings language can easily implement with graphic eg: C,C++,PHP,.net etc. Here we are learning about Graphic in C language with example, graphics.h library...
Read more →

What is Call By Value in C

,
In C Programmings we have different ways to parameter passing schemes such as Call by Value and Call by Reference. Call By Value:- In the Call By Value the function is to be called by passing the value in the parameter of a function called. By default, C programming language uses call by value method to pass arguments. There are the two type of a arguments which are passed in the function. 1) Formal Arguments:- Formal Arguments is the parameters which...
Read more →

What is Call By Reference in C

,
In C Programmings we have different ways to parameter passing schemes such as Call by Value and Call by Reference. Call by Reference:- Reference means the address not the actual value, the address of a variable or anything. So in the call by reference we use the address of a variable instead of passing the value of a variable in the function. When we want to use address we have to use the concept of pointer because pointers have the capability to store...
Read more →

How to Use Union in C Programming

,
Union is a derived datatypes which group together a number of variable . Union is like a structure in c language which used to store one of a set of different types. A union holds the value of one-variable at a time. C Programming provide this facility which help to share same memory with different different variables. Accessing members of a union is via “.” member operator or, for pointers to unions, the -> operator. union syntax in c : union...
Read more →

C Storage Classes With Examples

,
Storage Class refers to the persistence of a variable (life time) and its scope within the program, that is, the portion of the program over which the variable is recognized. The following types of storage-class specifications in C Language. global automatic or local static extern The visibility of a variable determines how much of the rest of the program can access that variable. You can arrange that a variable is visible only within one part of...
Read more →

Static Function in C Language

,
By default any function that is defined in a C file is extern, which means they're visible across translation units. But when we use “static” keyword it restricts visibility of the function to the translation unit in which it's defined. static int sfun(void) {   printf("I am a static function "); } when we want to restrict access to functions, we make them static. Static functions are functions that are only visible to functions in the same file...
Read more →

Type Casting in C Language

,
Type casting is a way to convert a variable from one data type to another data type. Type Casting is force to convert one data type to another data type. The process of such local conversion is known as casting a value. The general form of cast is: (type-name) expression where type-name is one of the standard C data types. Consider, for example, the calculation of salary of employee to engineers in a town. salary = amount / days Since amount and days...
Read more →

What is Loops in C and C Plus Plus Programmings

,
Introduction Loops in simple languages it's process of round (circle) of a work or activity. C and C Plus Plus also provide this function in c  and c plus plus. It provide a function which repeat your code in a block. It itterate you code and execute until work when condition will not be false. Types of Loops 1. While Loop 2. Do While Loop 3. For Loop While Loop:- While Loop is another type of loop which very useful for C Programmings.  In this loop in case we are using increament or decrement with condition. then atleast one time increament or decrement...
Read more →

Data Types in C Language With Size

,
C has a concept of 'data types' which are used to define a variable before its use. C compilers support four fundamental data types, namely integer (int), character (char), floating point (float), and double-precision floating point (double). Like integer data type, other data types also offer extended data types such as long double and signed char. Data Type Data Type of a variable tell to the compiler Name of variable Which type of value that variable...
Read more →

File Handling in C Language

,
File handling means one can perform operations like create, modify, delete etc on system files. You want to read from or write to one of the files you're working with, you identify that file by using its file pointer. File Handling Funtions : fopen() : The fopen() function is used to open a file and associates an I/O stream with it. The mode string "r" indicates reading. Mode "w" indicates writing, so we could open. The third major mode is "a" for append....
Read more →

String In C Language

,
The string in C programming language are represented by arrays of characters. The end of the string is marked with a special character, the null character, which is simply the character with the value 0. Whenever we write a string, enclosed in double quotes, C automatically creates an array of characters for us, containing that string, terminated by the \0 character. For example, we can declare and define an array of characters, and initialize it with...
Read more →

How structures are to be used in c

,
...
Read more →

Thursday, October 7, 2010

What is Inheritance?

,
What is Inheritance? Inheritance is one of the important feature of the OOP.Inheritance is the method by which objects of one class gets the properties of another class. Advantages of Inheritance? Sometimes we need to repeat the code or we need repeat the whole class properties. So It helps in various ways. 1.) It saves memory space. 2.) It saves time. 3.) It will remove frustration. 4.) It increases reliability of the code 5.) It saves the developing and testing efforts. Why we use Inheritance? To increase the reusability of the code and to make further usable for another classes....
Read more →

Tuesday, September 7, 2010

static data member in c++ | How to use Static Data Member

,
Static data member:-The static is a keyword and are used to retain value of a variable. When a variable is declared as static it is initialised to zero .A static function or data element is only recognised inside the scope of the current. if the local variable is declared with static keyword.it allows the last value of the variable to be retained between continuation calls to that function. A static data  item is helpful when all the objects of the class should share a common data. The satic data variable is accessible within the class,but its value remains through the whole program. class...
Read more →

Classes in Cplusplus | How to use Class in C++

,
A class is a group of Objects that have the identical properties,common behavior, and shared relationship. The entire group of data and code of an object can be built as a user-defined data type using class. Objects are nothing but variable of type class. A class is a model and not a true structure of the object .However it shares the property names or operations with other objects of the class. #include<iostream.h> #include<conio.h>  Class p { Private : Char n [20]; Public : Float h ; Float w ; } ; Int main () { Clrscr () p a; //a.n =”Sanjay”;// not accessible a.h...
Read more →

How to use functions in Cplusplus

,
Why we are use Function? Function is a block of task, In simple word we can say that it's block which we contain instruction or procedure. Which is very useful when we need some procedure or instruction block which execute process and less of development time for a software or solution any kind C and C++ program. Types of Function 1. Parameterize Function 2. Non Parameterize Function 3. Friend Function 4. Virtual Function Guidelines for using function. 1. Always define prototype 2. When we use friend function use friend keyword 3. In virtual function use keyword virtual Example of...
Read more →

Sunday, August 29, 2010

How to use Pointer in c tutorial | Pointers in Cplusplus | pointer in c language

,
What is Pointer? Pointer is very important in C and C++. It's  a variable which stores memory of user type and primary variable. It Hold the value of memory of a variable. Why we use Pointer? Some time we need to storing the address of variable for solving this problem we use pointer which capable to storing the memory address of a variable. Guideline for using pointer 1. Define * When we use pointer 2. when we store address of pointers of pointer then we use **variable name Example of Pointer #include<iostream.h> int main () { int first,second; int * ptr; ptr = &first; *ptr...
Read more →

String Operations in cplusplus

,
String Handling:-A string is a collection of  characters.String is  a class in cplusplus and there are three constructors in the String class. 1.)String():-For creating an empty string 2.)String(Const char *str):-For creating a string object from a null terminated string 3.)String(const string &str):-For creating a string object from other string object #include<iostream.h> #include<string.h> void main( ) { char ch1[] = “Cplusplusexample”; char ch22[80]; for(int i=0; i ch2[i]=ch1[i]; ch2[i]=’\0’; cout<< “The copied string is “<< ch2; } Output:-The copied...
Read more →

Exception Handling in Cplusplus

,
Exception handling:-Exception Handling is used in object oriented programming.It is feature by which we can handle easily a lot of feature.so that u can easily debug the code and to find the where the actual problem reside.In the Exception Handling we can use the try and the catch block In the try block we can use the code in which the error may be occured that are to be placed in try block. In the catch block particular error are to be handled in which way.The solution of particular error are provided in the catch block. Example:- #include<iostream.h>int  main(){int a,b;cout<<”Enter...
Read more →

Thursday, August 26, 2010

Vectors

,
...
Read more →

Function overriding in c++ | What is Function overriding

,
...
Read more →

Recursion

,
...
Read more →

Access Modifiers

,
...
Read more →

What is Base class in c++ and How to use with derived class c++

,
...
Read more →

Derived class

,
...
Read more →

Preprocessor directives

,
...
Read more →

Difference between Structure and classes

,
...
Read more →

Command Line Arguments

,
...
Read more →

Example of constructor overloading c++ | How to Constructor Overload

,
class CO {    private:        int a;        int b;        int c;   public:       CO(int x,int y,int z);       CO(int x,int y);       CO();       void   show()       {           cout<<"\na="<<"b="<<<"c="<       } };...
Read more →

Array Of objects

,
...
Read more →

Delete Operator

,
...
Read more →

Memory Management Operators

,
...
Read more →

cout object

,
...
Read more →

cin object

,
...
Read more →

Compiling and linking

,
...
Read more →

Structure of C++ Program

,
...
Read more →

Nesting of Classes

,
...
Read more →

Dynamic Binding

,
Definition of Dynamic Binding:-Binding means that  a procedure call of the code is executed , when we call the particular code. Dynamic Binding means at the run time we know that which code is particularly associated to which code. Dynamic Binding also known as Late Binding. It is generally associated with polymorphism and Inheritan...
Read more →

Data Hiding

,
...
Read more →

Message Passing

,
A mesage for an object is a request for execution of a procedure,and therefore will invoke a function in the receiving object that generates the desired result Example:-Employee.salary(nam...
Read more →

Encapsulation

,
What is Encapsulation? The packing of data member and member functions into a single component is called Encapsulation.The data is not reached by the outside functions.Only those functions that are able to access the data are defined within a class.Class is the best example of Encapsulati...
Read more →

Abstraction

,
...
Read more →

Compile time polymorphism

,
...
Read more →

Runtime Polymorphism

,
...
Read more →

Late Binding

,
...
Read more →

Early Binding

,
...
Read more →

Arrays In Cplusplus

,
...
Read more →

Do-While Loop

,
...
Read more →

While-Loop

,
...
Read more →

For-Loop

,
...
Read more →

Polymorphism

,
...
Read more →

Default Constructor

,
...
Read more →

Monday, August 16, 2010

Scope Resolution Operator

,
Definition of Scope Resolution Operator:-The scope access(or resolution operator)operator :: (the two semicolons)allow programmers to access a global name even if it is hidden by a local re-declaration of that name. When we declare a variable it is available only to a specific part or block of the program.Remaining block cannot access the variable .The area of a block where the variable is accessed is known as the scope resolution operator. Example:-#include int a=10; main() int a=20; cout<<"::a"<<::a; cout<<"a="< return 0; Result:- 10 ...
Read more →

Operators

,
...
Read more →

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 Constant2.)Real Constant3.)Character Constant4.)String Constant1.)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...
Read more →

Identifiers

,
Definition of Identifiers:-Identifiers are the names of variables,functions,arrays and classes.They are the user-defined names,consisting of sequence of letters and digits.The underscore is also permitted if u want ,u can use it according to need.Example:- 1.) Class person { }; 2.)void show { ...
Read more →

Keywords

,
...
Read more →

Tokens

,
...
Read more →

Enumerated data Types

,
...
Read more →

Function Overloading

,
#include<iostream.h>#include<conio.h>Int sqr  (int);Float sqr (float);Main (){Clrscr ();Int a= 15;Float b = 2.5;Cout <<”Square =”<<<”/n”;Cout <<”Square =”<<<”/n”;Return 0;}Int sqr (int s){Return (s*s);}Float sqr (float j){Return (j*j);} OUTPUT Square = 225Square = 6....
Read more →

Operator Overloading

,
...
Read more →

Copy Constructor

,
...
Read more →

Parameterized constructor

,
...
Read more →

Destructor

,
...
Read more →

Static functions

,
...
Read more →

Typecasting in C and C++

,
...
Read more →

Inline functions

,
...
Read more →

Default Arguments

,
C++ lets the programmer to assign default values in the function prototype declaration of the function.When the function is called with less parameter or without parameters the default values are used for the operations .It is not allowed to assign default values to any variables,which is between the variable list. Example:- #include<iostream.h>#include<conio.h> int main() {Clrscr ();int sum (int a, int b=10, int c=15, int d=20);Int a=2;Int b=3;Int c=4;Int d=5;Cout<<”Sum=”<Cout<<”/nSum=”<Cout<<”/nSum=”<Cout<<”/nSum=”<Cout<<”/nsum=”<Return...
Read more →

Manipulators

,
...
Read more →

This Pointer

,
...
Read more →

Data Types in c++

,
...
Read more →

Interfaces

,
...
Read more →

Abstract Class

,
...
Read more →

Virtual Base Class

,
...
Read more →

Pure Virtual functions

,
...
Read more →

Virtual functions

,
...
Read more →

Hybrid inheritance

,
Hybrid Inheritance:- It is a combination of two of the inheritance Multiple and hierarchical Inheritance Example:- class A { A() { Cout<<”I m in A”; } }; Class B:public A { B() { Cout<<”I m in B”; } }; class C:public C { C() { Cout<<”I m in C”; } }; Class D:public B,public C { D() { Cout<<”I m in D”; } }; Voi d main() { D d; } Output:- I m in A I m in B I m in C I m in...
Read more →

Hierarchical inheritance

,
Hierarchical Inheritance:-In the Hierarchical Inheritance there is only base class and all the derived classes are derived from this base class. Example:- class A { A() { Cout<<”I m in A”; } }; Class B:public A { B() { Cout<<”I m in B”; } }; class C:public A { C() { Cout<<”I m in C”; } }; Class D:public A { D() { Cout<<”I m in D”; } }; Voi d main() { D d; } Output:- I m in A I m in B I m in C I m in...
Read more →

Multilevel Inheritance

,
 Multilevel Inheritance:-In the Multilevel Inheritance there is one base class and other class which is derived from this base class is called derived class. The process of deriving a class  from another derived class. class A { A() { Cout<<”I m in A”; } }; Class B:public A { B() { Cout<<”I m in B”; } }; class C:public B { C() { Cout<<”I m in C”; } }; Class D:public C { D() { Cout<<”I m in D”; } }; Void main() { D d; } Output:-I m in A I m in B I m in C I m in D ...
Read more →

Multiple Inheritance

,
Multiple Inheritance:-I n the multiple Inheritance there will be many base classes and there is only one derived class which derives from all the base classes. Example:- class A { A() { Cout<<”I m in A”; } }; Class B { B() { Cout<<”I m in B”; } }; class C { C() { Cout<<”I m in C”; } }; Class D:public A,public B,public C { D() { Cout<<”I m in D”; } }; Voi d main() { D d; } Output:- I m in A I m in B I m in C I m in...
Read more →

Single Inheritance

,
Single Inheritance:-In the Single Inheritance there will only one base class and only one derived class.It should be like this. Example:- class A { A() { Cout<<”I m in A”; } }; Class B:public A { B() { Cout<<”I m in B”; } }; Voi d main() { B b; } Output:-I m in A I m in...
Read more →

C++ Description

,
...
Read more →

Difference between C and C++

,
...
Read more →

Thursday, July 22, 2010

What is C++ Constructor, and How to use Constructor with Inheritance

,
A constructor is a special type of function whose functionality is to intialize the data members of a class at a time of object creation.so that it is also called automatic intialization of objects. Properties of a constructor:-1.)It is invoked automatically at a time of the creation of object.so that the data members are intialized. 2.)It has neither return type nor void type. 3.)The name of a constructor and class should be identical. 4.)It should be declared on a public section. Types of aconstructor:- 1.)Default Constructor.2.)Copy Constructor.3.)Parametrised construc...
Read more →

Thursday, July 8, 2010

Use of Friend Function

,
Friend Function is a very nice feature of C++. You know that when we write a programme in c ++ we also use class. We also define members of classes which are accessible or not. In this post we'll discuss what is friend function, what the use of friend function, and how to use of friend function. 1. What is friend function What function is ordinary function and another feature of C++. Which is very useful when we use Private or Public classes both. 2. What the use of friend function Some Time we write programme in C++ and declare some member private and some public but in case we another class...
Read more →

Wednesday, July 7, 2010

what is object in c++

,
In C++ be are Write many because it's object oriented programming language (OOPS). But Many beginner student of C++ confuse what is Object and how to use. In this post we'll discuss about Object of C++ and, What is Object, How to use. What is Object.Objects are the basic runtime entities in any system.Objects are behave as a container which contains the properties of a class.How to useFor Example:-Student is a class and the student1 is the object of class student.class student{char name[50];void display();};student student1; //object created of class studentstudent1 contain the name and...
Read more →

Friday, July 2, 2010

Example of If Else Statement in C

,
If else statement is very useful in any programming language.  An if statement may also optionally contain a second statement, the “else" clause which is to be executed if the condition is not met. Here is an example: if(n > 0) { average = sum / n; else { printf("can't compute average\n"); average = 0; } The general syntax of an if statement in c: if ( expression ) statement(s) else statement(s) This feature is based in our daily life many...
Read more →

What is Loop in C++

,
Loop is a block code which is very useful in C or Cplusplus Programming. In real life many times we need some work in a repeated way. C and Cplusplus also provide this feature in programming we can easy to create loop which is help to your program when you need some repeat work. Loops are 2 types 1. Entry Control Loop. 2.)Exit Control Loop. Q. if we need print a name in 10 times then we have 2 option first is write the printf command in 10 times and second is use loop In C # Include # include main() { int i; char name[]={"abcd"}; for (i=1;i<=10;i++) { printf("%s",name); } in C++ #...
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...
Read more →