## endl vs \n in C++

Although they both seem to do the same thing, there is a subtle difference between them. cout << endl : Inserts a new line and… Read More »

- Maximum absolute difference in an array
- Program to find the Nth Prime Number
- Predict the winner in Coin Game
- Check if it is possible to create a polygon with given n sides
- Check whether the triangle is valid or not if angles are given
- Check if the string contains consecutive letters and each letter occurs exactly once
- Elements greater than the previous and next element in an Array
- Capitalize the first and last character of each word in a string
- Reduce the fraction to its lowest form
- Remove the first and last character of each word in a string
- Count of quadruplets with given Sum
- Check whether the given string is a valid identifier
- Program to calculate Double Integration
- Determine the number of squares of unit area that a given line will pass through.
- Increment odd positioned elements by 1 and decrement even positioned elements by 1 in an Array
- Minimum steps required to convert the matrix into lower hessenberg matrix
- Find the volume of rectangular right wedge
- Number of positions such that adding K to the element is greater than sum of all other elements
- Count of elements whose absolute difference with the sum of all the other elements is greater than k
- Find the sum of the number of divisors
- Program to calculate the number of odd days in given number of years
- Blog | Programming Guidelines
- Find the sum of the first half and second half elements of an array
- Largest and smallest digit of a number
- Find number of magical pairs of string of length L
- Check whether Quadrilateral is valid or not if angles are given
- Ratio of the distance between the centers of the circles and the point of intersection of two direct common tangents to the circles
- Count the number of occurrences of a particular digit in a number
- Area of the biggest ellipse inscribed within a rectangle
- Compare sum of first N-1 elements to Nth element of an array

Although they both seem to do the same thing, there is a subtle difference between them. cout << endl : Inserts a new line and… Read More »

A function is a set of statements that take inputs, do some specific computation and produces output. The idea is to put some commonly or… Read More »

In C, when we pass an array to a function say fun(), it is always treated as a pointer by fun(). Below example demonstrates the… Read More »

What is a structure? A structure is a user defined data type in C/C++. A structure creates a data type that can be used to… Read More »

Compiler and Interpreter are two different ways to execute a program written in a programming or scripting language. A compiler takes entire program and converts… Read More »

Given an array of integers, find sum of its elements. Examples : Input : arr[] = {1, 2, 3} Output : 6 1 + 2… Read More »

Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More »

Given an array (or string), the task is to reverse the array/string. Examples : Input : arr[] = {1, 2, 3} Output : arr[] =… Read More »

The Function prototype serves the following purposes – 1) It tells the return type of the data that the function will return. 2) It tells… Read More »