Constructors, Destructors and Inline Function in C++

Constructors:- Constructor is a user defined function whose name is same as the class name. Constructor is called as a user defined function, because, a programmer can provide its own constructor with its own functionality. Constructor is a first function which is called implicitly in the objects lifetime. In the constructor , memory is not allocated for the object but constructor is responsible for following things, 1)    It is responsible for initializing memory allocated for that object. 2)    Constructor is responsible for setting appropriate environment for a class. 3)    If our class contains…Read more

Function Overloading (C++)

Function Overloading:-   Function overloading is compile time polymorphism. Appropriate function call is resolved at compile time only. This means writing a function with a same name but with the different definations. There are some rules to write a n overloaded functions. Functions are overloaded on to the basis of number of parameters and type of parameters. C++ compilers differentiate the overloaded function by using naming decoration or name mangling. We can also overload constructor but not destructor. We can not overload a function depend on its return type value because at the…Read more

Constant concepts (C++) with Examples

Constant concepts C++:- Constant is a data type qualifier which provide extra quality to our normal variable and that quality is :- After initializing a constant vairable with appropriate value which we can not change that initialized value. In C and C++, rules about constant variable is that we have to initialize that constant variable at the time of declaration of that variable. We can not initialize the variable after declaring it.   const int I; i=10; // Error   In this case, if the variable I is the local variable then at…Read more

Mobile Device Management

At the starting this proposition work called COMMONS that was to discover the regular portable framework for versatility answer for the Bus of ABB. The 37 cross stage advances were explored to check whether they have the capacity to improve a portable system that can run on distinctive unit stages, for example ipad, Android apparatuses and Windows Phone. There are numerous profits furnished by cross-stage instruments (CPT): low incremental expenses and large amounts of code reuse, brief time-to-market, expanded generally application quality. Utilizing Cpts let the designers address numerous stages. The designers in…Read more

Classes in C++

Class:- Class is a collection of a characteristics and a behaviors. Characteristics means data members defined in the class and behaviors means a member functions/methods which are defined in the class and this methods are applied on to the characteristics of the class. e.g. class demo { public: int i,j; void fun() { cout<<”Inside the fun of demo”; cout<<i; cout<<j; } }; In the above example, demo is our class which contains two characteristics as I and j. and both are integers. Behaviors of the demo class is a function fun() which applied…Read more

Pure Virtual Function & Abstract Base Class

If we want to provide only interface for the derived class then we use the concept of abstract base class. If we create abstract base class then we can not create object of that base class. Writing pure virtual function means writing (=0) at the end of a prototype of a function without any defination. When we write at least a single pure virtual function inside the class then that class is considered as a abstract base class. A class having pure virtual function only says what to do does not say how…Read more

Reference Variables in C++

This concept is used in C++. When we create a variable of any data type, we use single identifier to identify that variable. Example:    int i; In this case, i is an identifier from which we can access that variable. If we want to assign some another name to that same identifier then we can use the reference variable concept from C++. A reference variable are such a variable which are refering to already created datatypes. A reference variables are the names given to the variable. Entry of that another name is…Read more

Pointers : In Simple Terms

Before starting a pointer first clear basic concepts of a variable. A variable is nothing but a name given to a storage area that our program can manipulate. Each variable in the C has a specific type which determines a size and the layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. When we declare a variable like int no = 21; Then it does get 4 bytes of memory and inside that memory…Read more

The Karbonn S5 Titanium Review

The Karbonn S5 Titanium is the next version of S1 Titanium. It has 5-inch HD display and an 8-megapixel rear camera. The price at the time of launching was around 12000 but now it has come down to 9999 in the online market. Let’s find out why you should buy this karbonn product. Design The karbonn titanium S5 is looks a little different from the titanium S1. It is much more thinly compared to its previous version. The phone is launched in 2 colours that are white and deep blue. It has 5-inch…Read more

Static Members and Static Concept

The static concept in C and C++ is different. When we create the static variable in the C its scope is limited means inside its .obj file only. But in the C++ when we create the static member its single copy can be shared between all the objects of the class. Memory allocated for the static members is on the .bss or non bss section. We can initialize the static members inside the constructor like the non static members, or we can initialize it after the class definition like int demo::i=10; Value for…Read more