Skip to content

Category Archives: C++ Programs

Public All the class members declared under public will be available to everyone. The data members and member functions declared public can be accessed by… Read More
This article explains how to modify the content of a Binary File. Given a binary file that contains the records of students, the task is… Read More
Given a String comprising of many words separated by space, the task is to iterate over these words of the string in C++. Example: Input:… Read More
Public All the class members declared under public will be available to everyone. The data members and member functions declared public can be accessed by… Read More
The math.h header contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions. In order to use… Read More
Given a vector, the task is to erase an element from this vector using erase() and reverse_iterator. Example: Input: vector = {1, 4, 7, 10,… Read More
Given are two circles with their centres C1(x1, y1) and C2(x2, y2) and radius r1 and r2, the task is to check if both the… Read More
Given a number n, the task is to write a program in C++ to print the n-terms of Fibonacci Series using a Class template The… Read More
Prerequisite: Disk Scheduling Algorithms Given an array of disk track numbers and initial head position, our task is to find the total number of seek… Read More
Given N boxes that are kept in a straight line and M colors such that M ≤ N. The position of the boxes cannot be… Read More
Given a matrix mat[][], the task is to check whether the matrix is valid or not. A valid matrix is the matrix that satisfies the… Read More
Given an integer N, the task is to find the summation of the harmonic series .Examples:   Input: N = 5 Output: 10 floor(3/1) + floor(3/2) + floor(3/3) =… Read More
Given a word str, the task is to print the alphabets of this word using * pattern.Examples:   Input: GFG Output: ****** * * * *… Read More
Given the last rank ‘L’ and the number of candidates at the last rank ‘T’, the task is to find the total number of candidates… Read More
C++ helps you to format the I/O operations like determining the number of digits to be displayed after the decimal point, specifying number base etc.… Read More

Start Your Coding Journey Now!