
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 7333 Articles for C++

4K+ Views
Cartesian-coordinate System and Quadrants The cartesian-coordinate system is divided into four Quadrants: Quadrant I, Quadrant II, Quadrant III, and Quadrant IV. In this article, we are going to learn how we can determine the quadrant in which given points i.e., x and y, lie. Problem Description We are given the position of a point (x, y), and we have to determine in which quadrant this point lies. Example Input: (-3, 2) Output: Quadrant II Input: (2, 5) Output: Quadrant I Input: (2, -4) Output: Quadrant IV Input: (-6, -3) Output: Quadrant III Using Conditional Quadrant Identification Approach ... Read More

3K+ Views
What is Geometric Progression (GP)? Geometric Progression (GP) is a sequence of numbers where each term is generated by multiplying the previous term by a constant value. This constant value in GP is known as the common ratio. In this article, we are going to discuss how to calculate the sum of infinite terms in a GP using different approaches in C++. Note: The important condition to remember is that a positive valid sum of infinite GP is only possible if the absolute of the common value (r) is less than 1, i.e., ∣r∣ < 1. Methods to Calculate ... Read More

4K+ Views
boundary elements of a matrix The boundary elements of a matrix are those elements that lie along its edges. A matrix is a two-dimensional array that can be of any given size. The boundary elements are those present on the edges of the matrix. Problem Description We are given a matrix of size m × n. We need to find the boundary elements of the matrix. Boundary elements are the elements present on the top and bottom rows and the first and last columns of the matrix. Below are examples to understand the boundary traversal of a matrix: ... Read More

4K+ Views
A Harshad number is a special type of number. A Harshad number or Niven number is a number that is completely divisible by the sum of its digits without leaving any remainder. In this article, we are going to learn how we can check whether a given number is a Harshad number or not. Problem Description We are given a number and we have to return true if the given number is Harshad or Niven number and false if the given number is not a Harshad number. Example 1 Input: 108 Output: yes Explanation: The sum ... Read More

4K+ Views
A matrix is a two-dimensional array. The elements that are present on the edges are called boundary elements, and the elements that are present inside the matrix, not present on the edges, are known as non-boundary elements. In this article, we are going to discuss how to print non-boundary elements of the matrix. Problem Description We are given a matrix and we have to print all non-boundary elements present in the matrix. Rows and columns are present ... Read More

4K+ Views
Minutes and seconds are time units commonly used in applications ranging from digital clocks to timekeeping in games and simulations. Converting minutes into seconds is a straightforward operation but essential in many time-sensitive applications. In this article, we will learn how to convert minutes to seconds using C++. Formula The formula to convert minutes to seconds is: seconds = minutes × 60 Examples Input 5 Output 300 Input 10 Output 600 Using Function We will write code that defines a function, convertMinutesToSeconds. This function will take the minutes as an input parameter for ... Read More

5K+ Views
A palindrome is a word, phrase, number, or other sequence of characters that reads the same from both backward and forward sides. In strings, the palindrome strings are those strings that can be read the same from both left and right sides. In this article, we are going to learn how we can check if a given string is palindrome or not using the two-pointer technique in C++. Problem We are given a string, and we have to check if it is palindrome or not using the two-pointer method in C++. Example 1 ... Read More

4K+ Views
Mean, Median, and Mode are fundamental statistical measures that are used to describe the central tendency and also explain the spread of the sheet. These three measures help in understanding the overall distribution of the data. In this article, we are going to learn how to find the Median if we are given the Mean and Mode of an array in C++. Problem Statement We are given an array of numbers, and we need to calculate the Median, in case when Mean and Mode of an array are given in C++. Example Input [5, 15, 25, 35, ... Read More

4K+ Views
Mean, Median, and Mode are key statistical measures that help in describing a dataset's central tendency and distribution. These quantities help in understanding the central tendency and distribution of the given data. In this article, we will learn how to find the Mean if the Median and Mode of a given array are known in C++. Problem Statement We are given an array of numbers, and we need to find the mean if the median and mode are provided in C++. Example Input: [5, 15, 25, 35, 35, 40, ... Read More

4K+ Views
Mean, median and mode are three basic concepts of statistics. These quantities help in understanding the central tendency and distribution of given data. In this article we are going to learn, how we can find the Mode if the Mean and Median of a given array (which is the same as ungrouped data) in C++. Problem statement We are given an array of numbers and we have to find the mode if mean and median are given in C++. Example Input [5, 15, 25, 35, 35, 40, 10] Mean = 20Median = 25 Output 35 Brute Force Approach Mode is ... Read More