Author name: admin

swap two numbers in cpp
Digital Trends, Programs

C++ program to swap two numbers

In this example, you will learn a C++ program to swap two numbers. This program takes two numbers from the user like 2 and 5 and swaps them. After the swap, the first number 2 becomes 5 and the second number 5 becomes 2. Example: C++ program to swap two numbers Output Description and working of … Read more

File handling in cpp
Digital Trends, Tutorials

C++ File Handling

C++ File handling is used to store, input, and output data permanently on secondary memory.Normally, program data are stored in variables. When the program execution ends all the stored data and computational results are destroyed because data in variables are temporary.The user has to input data each time when the program executes which refers to … Read more

Tutorials

C++ Strings

C++ Strings are categorized in two ways. Character String String Class Character String Character string in c++ is an array of characters enclosed within a double quote. It mainly consists of any alphabets, characters, digits, or special symbols. The last character of the string will be the null character “\0” to terminate the string. The … Read more

Tutorials

C++ Polymorphism

C++ Polymorphism is the capability of objects of different types to respond to functions of the same name. The program does not know the actual object type in advance. The word polymorphism is a mixture of two works ploy and morphism where poly means many and morphism means forms. It is applicable when the classes … Read more

Tutorials

C++ Inheritance

C++ Inheritance is used to create a new inherited class from the reuse of the existing class. The new class inherits all the properties and behavior of the existing class. It is the best example of an object-oriented concept in C++. In inheritance, the existing class is known as the parent class or base class … Read more

Tutorials

C++ Classes And Objects

C++ Classes and objects are used to support object-oriented concepts. This is the key feature of the c++ programming language.  In this concept, the code is divided into classes and objects. It is useful in terms of reusability and understanding of the code. What are C++ classes and objects? In a real-world example, we can … Read more

Tutorials

C++ Arrays

C++ Arrays are the collection of similar data stored in consecutive memory locations. Arrays are handy when dealing with a large amount of similar data.   Suppose a user wants to store the marks of 100 students and declare 100 variables. It does not make sense. This process can be simplified by using an array. … Read more

built in function in cpp
Digital Trends, Tutorials

C++ Built-in Functions

C++ Built-in functions are the ready-made library functions. These are the part of the c++ programming language. C++ offers a large number of built-in library functions to solve programming problems faster and easier. There are many libraries in c++ with have different sets of functions like iostream, cmath, ctime, etc. We don’t need to declare … Read more

Tutorials

C++ User-defined Functions

Function in c++ is a unique named block of code to perform certain tasks. All the statements written in the function body are executed when a function is called by its name.  The control moves to the function body when a programmer calls a function. After that, all the statements inside the function are executed. … Read more

Tutorials

C++ goto Statement

Goto statement in c++ is used to shift control from goto to a certain location of the program by using a label.  A label is a name given to a specific line of the program where the control is going to shift. It is created by the goto identifier followed by a colon “:” Syntax: … Read more

Scroll to Top