Posts from C++

How to find the Nth XOR Fibonacci number in C++

By Tanmaay Kankaria

In this article, given three numbers a, b and n, where a and b are the first two terms of the XOR Fibonacci series, we have to find the nth term. The Nth term of the XOR Fib.... Read More

How to remove the last element from an array in C++

By Tanmaay Kankaria

In this article, we are going to learn how to remove the last element from an array in C++. To delete the last element from an array we first get the array size and the array eleme.... Read More

Catch unknown exception and print it in C++

By Rakesh

This tutorial will focus on how to handle unknown exceptions and print that in C++. We know that in programming there are many unknown exceptions that one should handle. Exception .... Read More

Show two digits after decimal point in C++

By Ankur Sinha

In this tutorial, We are going to learn about how to show floating numbers up to two digits decimal places using C++.  To have a better understanding of the problem we must consid.... Read More

Round a number to the nearest integer in C++

By Ankur Sinha

In this tutorial, We are going to learn about How to round off a number to the nearest integer in C++. The data types used  for rounding off the integer can be are as follows: flo.... Read More

QuickSort Using Random Pivoting in C++

By Rakesh

This tutorial will discuss how to use quicksort using the random pivots in C++. We know that quicksort is based on the divide and conquer approach. It is different from the Merge s.... Read More

Generate a random element in C++ from an array

By Rakesh

In this discussion, we will see how to output a random element from an array in C++. We will make use of the rand() function which is an inbuilt function of C++ to generate random .... Read More

Sort string array based on length in C++

By Ankur Sinha

In this tutorial, We are going to learn how we can sort a string array based on the length of the individual strings in C++. Let us see some examples related to this problem. for e.... Read More

Related Posts