Skip to content

Category Archives: C++ Programs

Sets are a type of associative containers in which each element has to be unique, because the value of the element identifies it. The value… Read More
The std::multiset::key_comp() is an inbuilt function in C++ STL which returns a copy of the comparison object used by the container. By default, this is… Read More
Thread::get_id() is an in-built function in C++ std::thread. It is an observer function which means it observes a state and then returns the corresponding output.… Read More
Given a string, the task is to replace all the spaces between the words with a hyphen character ‘-‘.Examples:  Input: str = "Geeks for Geeks."… Read More
Given a positive integer N. The task is to find the sum of squares of all Fibonacci numbers up to N-th fibonacci number. That is,  … Read More
Given a function f(n) = (13 + 23 + 33 + … + n3), the task is to find the value of f(n) mod 4… Read More
Given a range of integer from ‘a’ to ‘b’ . Our task is to calculate the amount of numbers from the interval [ a, b… Read More
Given a number N containing digits from 1 to 9 only. The task is to generate a new number using the number N such that… Read More
Given a number N. The task is to count the minimum number of digits to be removed from the number so that no two consecutive… Read More
Thread::joinable is an in-built function in C++ std::thread. It is an observer function which means it observes a state and then returns the corresponding output… Read More
Given a string which consists of either ‘.’ or any number. A ‘.’ in the string means that the cell is empty and if there… Read More
Given a rectangle of length l and breadth b, the task is to find the largest rhombus that can be inscribed in the rectangle.Examples:   Input… Read More
The std::map::key_comp() is an inbuilt function in C++ STL which returns a copy of the comparison object used by the container.By default, this is a… Read More
Switch-case statements: These are a substitute for long if statements that compare a variable to several integral values The switch statement is a multiway branch… Read More
The max() function is defined in valarray header file. This function returns the largest value contained in the valarray. Syntax: T max() const; Parameter: This… Read More

Start Your Coding Journey Now!