• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » C++ » C++ Programming

How to Creating Objects and Allocate Memory for Objects in c++

By Dinesh Thakur

Once a class is defined, it can be used to create variables of its type known as objects. The relation between an object and a class is the same as that of a variable and its data type. [Read more…] about How to Creating Objects and Allocate Memory for Objects in c++

c++ – Defining member functions inside or outside the class definition

By Dinesh Thakur

Member functions of a class can be defined either outside the class definition or inside the class definition. In both the cases, the function body remains the same, however, the function header is different. [Read more…] about c++ – Defining member functions inside or outside the class definition

What is Class in C++

By Dinesh Thakur

A class in C++ is a user-defined data type that binds data and the functions that operate on the data together in a single unit. Like other user-defined data types, it also needs to be defined before using its objects in the program. A class definition specifies a new data type that can be treated as a built-in data type. [Read more…] about What is Class in C++

Function Overloading

By Dinesh Thakur

In some cases when a similar action is to be performed on different types of data, different functions having different names are to be defined for all types of data. This makes the program very complex as the programmer must keep a track of the names of all the functions defined in the program. To prevent such situations, C++ allows the functions to be overloaded. [Read more…] about Function Overloading

A program to demonstrate the concept of returning a reference

By Dinesh Thakur

[Read more…] about A program to demonstrate the concept of returning a reference

A program to demonstrate the concept of functions returning values

By Dinesh Thakur

[Read more…] about A program to demonstrate the concept of functions returning values

Static Variables Within Functions in C ++

By Dinesh Thakur

Any value assigned to an automatic variable within a function is lost once the control returns from the called function to the calling function. However, there may be a situation where the value of the local variable needs to be preserved even after the execution of the function gets over. This need can be fulfilled by declaring the variable as static. A static variable is commonly used when it is necessary for a function to remember a value between its calls. To understand the concept of static variables, consider this example. [Read more…] about Static Variables Within Functions in C ++

Arguments to main () in C ++

By Dinesh Thakur

Like C, C++ enables to pass arguments to the main () function also. These arguments are passed by typing them after the program name on the command line. Hence, these arguments are known as command line arguments. Command line arguments help in providing data to the program. [Read more…] about Arguments to main () in C ++

C++ function Call by Reference

By Dinesh Thakur

In addition to call by value, a function can also be called by reference. C++ provides two ways of passing arguments as reference to a function. The arguments can be passed either as a reference type or as a pointer type. [Read more…] about C++ function Call by Reference

C++ function call by value

By Dinesh Thakur

When a function is called by value, the values of the actual arguments are copied into the formal arguments and the function works with these copied values. As a result, any changes made to the copied value in the called function do not affect the value of the actual argument in the calling function. [Read more…] about C++ function call by value

Invoking Functions in C++

By Dinesh Thakur

In order to use a function in different parts of a program, the function must be called or invoked by another function. In C++, functions are called by specifying the name of the function, followed by the parentheses. The parentheses mayor may not contain a list of arguments depending on the function definition. [Read more…] about Invoking Functions in C++

Definition of Function in C++

By Dinesh Thakur

In order to use a function in a program, the function must be first defined somewhere in a program. A function definition contains the code that specifies the actions to be performed. The syntax for defining a function is [Read more…] about Definition of Function in C++

What is Function Declarations or Function Prototype?

By Dinesh Thakur

Like variables, functions also need to be declared before they are used in programs. A function declaration is also known as function prototype. Function prototype is a model or a blueprint for a function that informs the C++ compiler about the return type, the function name, and the number and data type of the arguments passed to the function. Function name together with parameter list is known as function signature and it does not include return type of a function. The syntax for declaring a function is [Read more…] about What is Function Declarations or Function Prototype?

How to Declaring Array of Structures in c++

By Dinesh Thakur

An array of structures refers to an array in which each element is of structure type. To declare an array of structures, firstly, a structure is defined and then an array of that structure is declared. The syntax for declaring an array of structures is [Read more…] about How to Declaring Array of Structures in c++

How to Declaring Nested Structures in c++

By Dinesh Thakur

Like other user defined data types, a structure can also include another structure, as its member, in its definition. A structure defined within another structure is known as a nested structure. [Read more…] about How to Declaring Nested Structures in c++

How to Declaring and Accessing Structure Variables in c++

By Dinesh Thakur

A structure can be used in a program only if memory is allocated to it. The structure definition informs the compiler about the type and the number of data members in the structures. However, it does not allocate any memory for the structure. To use a structure in a program efficiently, a structure variable needs to be declared. The syntax for declaring a structure variable is [Read more…] about How to Declaring and Accessing Structure Variables in c++

Defining Structures in C++

By Dinesh Thakur

Like arrays, structures are also used to store a list of data items in a single variable. However, these data items may be of different data types. Structures are used whenever a programmer requires binding the same or different types of related data items together into a single entity. [Read more…] about Defining Structures in C++

Multi-Dimensional Arrays in c++

By Dinesh Thakur

Multi-dimensional arrays can be described as ‘arrays of arrays’, that is, each element of the array is itself an array. A multi-dimensional array of dimension n is a collection of items that are accessed with the help of n subscript values. [Read more…] about Multi-Dimensional Arrays in c++

Single-Dimensional Arrays in c++

By Dinesh Thakur

A single-dimensional array is the simplest form of an array that requires only one subscript to access an array element. Like an ordinary variable, an array must have been declared before it is used in the program. The syntax for declaring a single-dimensional array is [Read more…] about Single-Dimensional Arrays in c++

Difference between Structures and Unions

By Dinesh Thakur

Both the structures and unions are syntactically and functionally same, however, they differ in the way memory is allocated to their members. While declaring structure variables, the different members are stored in different, although, adjacent memory locations whereas different members of a union variable share the same memory location. The amount of memory sufficient to hold the largest member of a union is allocated to a union variable. Thus, a union enables the same block of memory to store variable of one type at one time and of different type at another time. To understand the concept of memory allocation to a union, consider these statements. [Read more…] about Difference between Structures and Unions

Jump Statements in c++ or Goto statement

By Dinesh Thakur

Jump statements are used to alter the flow of control unconditionally. That is, jump statements transfer the program control within a function unconditionally. The jump statements defined in C++ are break, continue, goto and return. In addition to these jump statements, a standard library function exit () is used to jump out of an entire program. [Read more…] about Jump Statements in c++ or Goto statement

Iteration Statements or Loops in C++

By Dinesh Thakur

The statements that cause a set of statements to be executed repeatedly either for a specific number of times or until some condition is satisfied are known as iteration statements. That is, as long as the condition evaluates to True, the set of statement(s) is executed. The various iteration statements used in C++ are for loop, while loop and do while loop. [Read more…] about Iteration Statements or Loops in C++

Conditional Statements in C++ or if Statements

By Dinesh Thakur

Conditional statements, also known as selection statements, are used to make decisions based on a given condition. If the condition evaluates to True, a set of statements is executed, otherwise another set of statements is executed. [Read more…] about Conditional Statements in C++ or if Statements

What is Operators? Explain Scope Resolution Operator and Operators Precedence.

By Dinesh Thakur

In addition to the operators like arithmetic operators, relational operators, logical operators, the conditional operator and assignment operators that most of the languages support, C++ provides various new operators that are given in Table.New Operator [Read more…] about What is Operators? Explain Scope Resolution Operator and Operators Precedence.

What is Expressions in C++?

By Dinesh Thakur

A combination of variables, constants and operators that represents a computation forms an expression. Depending upon the type of operands involved in an expression or the result obtained after evaluating expression, there are different categories of an expression. These categories of an expression are discussed here. [Read more…] about What is Expressions in C++?

Data Types – Explain Data Type in C++.

By Dinesh Thakur

A data type determines the type and the operations that can be performed on the data. C++ provides various data types and each data type is represented differently within the computer’s memory. The various data types provided by C++ are built-in data types, derived data types and user-defined data types as shown in Figure. [Read more…] about Data Types – Explain Data Type in C++.

Input/Output Operator in C++

By Dinesh Thakur

In C++, input and output (I/O) operators are used to take input and display output. The operator used for taking the input is known as the extraction or get from operator (>>), while the operator used for displaying the output is known as the insertion or put to operator (<<). [Read more…] about Input/Output Operator in C++

Structure of a C+ + Program

By Dinesh Thakur

Programs are a sequence of instructions or statements. These statements form the structure of a C++ program. C++ program structure is divided into various sections, namely, headers, class definition, member functions definitions and main function. [Read more…] about Structure of a C+ + Program

Explain Various Type Object-Oriented Languages. Advantages and Applications of OOP

By Dinesh Thakur

To develop software, the object-oriented concepts need to be implemented in any high-level language. The high-level language that implements the concepts of object-oriented programming is known as an object-oriented language (also called an OO language). In general, an object-oriented language must support all or some of these OO concepts. [Read more…] about Explain Various Type Object-Oriented Languages. Advantages and Applications of OOP

What is Polymorphism?

By Dinesh Thakur

Polymorphism (a Greek word meaning having multiple forms) is the ability of an entity such as a function or a message to be processed in more than one form. It can also be defined as the property of an object belonging to a same or different class to respond to the same message or function in a different way. For example, if a message change_gear is passed to all the vehicles then the automobiles will respond to the message appropriately however, the pulled vehicles will not respond. The concept of polymorphism plays an important role in OOP as it allows an entity to be represented in various forms. [Read more…] about What is Polymorphism?

« Previous Page
Next Page »

Primary Sidebar

C++ Tutorials

C++ Tutorials

  • C++ - Data Types
  • C++ - Operators Types
  • C++ - CPP Program Structure
  • C++ - Conditional Statements
  • C++ - Loop
  • C++ - do-While Loop
  • C++ - Control Statements
  • C++ - Tokens
  • C++ - Jump Statements
  • C++ - Expressions
  • C++ - Constants
  • C++ - Character Set
  • C++ - Iteration Statements
  • C++ - I/O Statements
  • C++ - String
  • C++ - Manipulators

C++ Operator

  • C++ - Input/Output Operator
  • C++ - Operator Overloading

C++ Functions

  • C++ - Functions
  • C++ - Member Functions
  • C++ - Returning Object from Function
  • C++ - Call by Value Vs Reference
  • C++ - Friend Function
  • C++ - Virtual Function
  • C++ - Inline Function
  • C++ - Static Data Members
  • C++ - Static Member Functions

C++ Array & Pointer

  • C++ - Array
  • C++ - Array of Objects
  • C++ - Arrays as Class Members
  • C++ - Vector
  • C++ - Pointer
  • C++ - 'this' Pointer

C++ Classes & Objects

  • C++ - Class
  • C++ - Program Structure With Classes
  • C++ - OOP’s
  • C++ - Objects as Function Arguments
  • C++ - Procedure Vs OOL
  • C++ - Object Vs Class
  • C++ - Creating Objects
  • C++ - Constructors
  • C++ - Copy Constructor
  • C++ - Constructor Overloading
  • C++ - Destructor
  • C++ - Polymorphism
  • C++ - Virtual Base Class
  • C++ - Encapsulation

C++ Inheritance

  • C++ - Inheritance
  • C++ - Multiple Inheritance
  • C++ - Hybrid Inheritance
  • C++ - Abstraction
  • C++ - Overloading

C++ Exception Handling

  • C++ - Exception Handling
  • C++ - Templates
  • C++ - Standard Template Library

C++ Data Structure

  • C++ - Link List

C++ Programs

  • C++ Program for Electricity Bill
  • C++ Program for Multiply Matrices
  • C++ Program for Arithmetic Operators
  • C++ Program For Matrices
  • C++ Program for Constructor
  • C++ Program Verify Number
  • C++ Program Array Of Structure
  • C++ Program to find Average Marks
  • C++ Program Add And Subtract Matrices
  • C++ Program Menu Driven
  • C++ Program To Simple Interest
  • C++ Program To Find Average
  • C++ program exit()
  • C++ Program Using Array Of Objects
  • C++ Program Private Member Function
  • C++ Program To Reverse A String
  • C++ Program to Operator Overloading

Other Links

  • C++ - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW