Category Archives: C++

C++ topics,C++ programs,OOP concepts

Constructors in C++

What is a Constructor…???It is a method which have it’s name same as it’s respective class name.In this tutorial we shall learn about constructors in detail. The main properties of constructors are: 1.Name of the constructor is same as class … Continue reading

Posted in C++ | Tagged , , , , , , , | Leave a comment

Binary Search Program in C++

In our earlier post we learned about Linear search.Today we shall learn about other type of searching technique…i.e is binary searching.This method is different form the earlier one.We shall go in detail about this. If the data given by the … Continue reading

Posted in C++ | Tagged , , , , , , | 1 Comment

Linear Search Program in C++

In this tutorial we shall learn about searching elements present in the array.Generally two methods are being followed for searching.Those are: 1.Linear searching2.Binary searching .In this tutorial we shall learn about Linear searching. Method: 1.Get the data from the user … Continue reading

Posted in C++ | Tagged , , , , , , , , , | 2 Comments

C++ program to print number in pyramid shape

This is once of the basic program to start programming in C++.Here your main goal is to print the number’s in pyramid shape.The size of the shape depends on the input of the user.The output is similar to this picture:For … Continue reading

Posted in C++ | Tagged , , | Leave a comment

Prime number program in C++

Today we shall learn how to write a program to find a number is Prime number or not.Before we start writing a program we should learn the basic definition.A number is said to be prime number if”It is divisible by … Continue reading

Posted in C++ | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

C++ program to check whether given number is palindrome or not

This is a very simple program we need to be panic for this.A number is said to be palindrome if reversal of the number is equal to itself.For ex:141 is a palindrome number.To find the reverse of the number we … Continue reading

Posted in C++ | Tagged , , , , , , , , | Leave a comment

C++ program to find sum of digits for a given number

Today we shall learn how to find the sum of digits of a given number using classes.Here we get the input a number for the user.Then we shall compute the sum of digits by grabbing each digit of the given … Continue reading

Posted in C++ | Tagged , , , , , , , | Leave a comment

C++ program to generate Fibonacci series

Today we are going to write a program for Fibonacci series in c++ language which is very simple.We are going to use classes and functions in our program.BY definition Fibonacci series start’s by 0 and 1,from then,if we need a … Continue reading

Posted in C++ | Tagged , , , , , , , , , , , , , , , | 1 Comment

Virtual Base class

In hierarchical inheritance we have seen that a base class is inherited by many derived classes. If derived class is obtained from these derived class then a situation arises where compiler find’s ambiguity. Ambiguity is state where duplication of data … Continue reading

Posted in C++ | Tagged , , , , | Leave a comment

More in inheritance….

We shall continue our course in inheritance. We learnt about syntax, terminology, single inheritance in our last post. Today we shall learn about remaining types of inheritance. Multilevel Inheritance: In single inheritance base class is inherited by only one derived … Continue reading

Posted in C++ | Tagged , , , , , | Leave a comment

Inheritance

It is a great feeling if we could reuse anything which we bought or created. In the same way it is good to reuse the class which we have created earlier in a program. Object Oriented Programming provides this feature … Continue reading

Posted in C++ | Tagged , , , , , , , | Leave a comment

Static Data Members

In our last post we have stated that classes contain both data members and member functions.Generally we classify class members either as public or private.There is one more classification of class member as static member.We can have static data member … Continue reading

Posted in C++ | Tagged , | Leave a comment

Structure of C++ program

In our last post we have introduced you to the object oriented programming.Today we shall know about the structure of c++ program.The structure of c++ program mainly divided into three parts. 1.Header files 2.Declaration of classes 3.main function Let us … Continue reading

Posted in C++ | Tagged , , , | Leave a comment

Introduction to c++

Welcome to Let us programming guys.This is our first post introducing you to Object Oriented Programming well known as OOP. Here we are going to teach you about Object Oriented Programming and explain the concepts and advantages of using OOP’s … Continue reading

Posted in C++ | 1 Comment