Cpp Tutorial: Cpp Member function and different ways to initialize

In this chapter we shall learn about: 1. Defining member functions inside of the class 2. Defining member functions outside of the class 3. Characteristic of member functions 4. Inline member functions We know that a class has data members and member functions. In this chapter we shall learn how to declare a member functions […]

Cpp Tutorial: C++ classes and objects

Below are the topics covered in this chapter 1. Classes in C++ 2. Declaring objects 3. The dot operator 4. The arrow operator 1. Classes in C++ Classes in C++ are similar to structures in C. They are used to pack data-members and member functions. The variables defined inside a class are called as data-members. […]

Cpp Tutorials: C++ Storage Classes

Below are the different Storage Classes available in C++. We shall see all these storage classes in this chapter. 1. Automatic Storage Class 2. External Storage Class 3. Static Storage Class 4. Register Storage Class 5. Mutable Storage Class 1. Automatic Storage Class Keyword: auto Lifetime: Function Block Visibility: Local Initial Value: Garbage It is […]

Cpp Tutorial: C++ all about Strings

1. Introduction 2. String object in C++ 3. String relational operators 4. String modification functions 5. String attribute functions 6. Accessing string elements 7. Comparing string functions 1. Introduction String is a sequence of characters. Every string should be terminated by NULL character ‘\0’. In C style, an extra space need to be allocated to […]

Cpp Tutorial: C++ all about Arrays.

In this chapter we shall study about following topics: 1. One Dimensional array 2. Characteristics of an array 3. Accessing array elements through pointers 4. Arrays of pointers 5. Passing a single array element to a function 6. Passing whole array to a function 7. Two dimensional array An array is a collection of elements […]

Cpp Tutorial: C++ Functions

In this chapter we shall study about: 1. Function prototype declaration 2. Function Definition 3. Function call 4. Actual and formal arguments 5. Return statement. 6. Call by value 7. Call by address 8. Call by reference 9. Default arguments 10. Inline functions 11. Function Overloading 12. Recursion Function While developing software applications, a larger […]

Cpp Tutorial: C++ Looping Statements

1. While loop 2. Do .. while loop 3. For loop 4. Break 5. Continue 6. Nested loops Looping statements are used when we want to repeat the same set of statements again and again. Those set of statements will be executed until a particular condition is satisfied. Below we discuss about various types of […]

Cpp Tutorial: C++ Decision making statements

There are 6 types of Decision statements available in c++: 1. if 2. if else 3. nested if 4. conditional operator or ternary operator 5. switch statement 6. break 7. goto statement Decision making statements are used to change the flow of execution of the program from one part to another part of the program. […]

Cpp Tutorial: C++ qualifiers and C++ Operators

1. C++ qualifiers 2. C++ Operators 1. C++ qualifiers C++ provides one of two qualifiers. 1. Volatile: When a variable is defined as volatile, then the value can be changed. By default, if you create a variable, it is declared as a “volatile” variable. “volatile” is the keyword. Example: volatile int num = 10; num […]

Cpp Tutorial: C++ Special operators

In this tutorial we will learn about below topics: 1. Referencing operator 2. Dereferencing operator 3. Scope resolution operators 4. Memory management operators 5. Namespace 6. Comma operator 7. Arrow operator 8. This pointer 1. Referencing Operator: Referencing operator (&): This operator is used to define a referencing variable. A reference variable is used to […]