Given an input string which is comma-separated instead of space, the task is to parse this input string in C++.First, let us understand what difference… Read More
Category Archives: C++ Programs
Given a comma-separated string, the task is to parse this string and separate the words in C++. Examples: Input: "1,2,3,4,5" Output: 1 2 3 4… 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
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: str… 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
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