Akansha Kumari has Published 81 Articles

Alignof operator in C++

Akansha Kumari

Akansha Kumari

Updated on 22-Aug-2025 15:22:29

770 Views

C++ alignof() Operator The alignof operator is the operator that returns the memory alignment for a given variable type. This alignment tells how the data is arranged and accessed in memory. It returns the value in bytes and is the part of the header file in C++. which is ... Read More

Check if a line passes through the origin in C++

Akansha Kumari

Akansha Kumari

Updated on 05-Aug-2025 12:44:40

688 Views

In this article, we have a line and its coordinates are given. Our task is to check if this line passes through the origin or not. The basic two-point form of a straight line is given by: $$ \frac{y - y_1}{y_2 - y_1} = \frac{x - x_1}{x_2 - x_1} + ... Read More

What is the best IDE of C++ on Linux?

Akansha Kumari

Akansha Kumari

Updated on 01-Aug-2025 17:51:02

686 Views

While developing softwares, the big projects become difficult to manage on mere text editors. So using an IDE makes it more smoother and productive. In this article we will discuss the popular IDE's for working with C++ programs on a Linux environment. We will compare the features of various IDEs ... Read More

Check if a large number is divisible by 11 or not in C++

Akansha Kumari

Akansha Kumari

Updated on 30-Jul-2025 15:19:13

611 Views

In this article, we are given a larger number and we need to check whether it is divisible by 11 or not using the C++ program. To handle large numbers, we treat the number as a string and apply a divisibility rule to check if it's divisible by 11. ... Read More

Find the largest three elements in an array in C++

Akansha Kumari

Akansha Kumari

Updated on 29-Jul-2025 17:55:31

10K+ Views

An array is a group of similar data elements stored at contiguous memory locations. It is one of the fundamental data structures in programming and used to store and manage multiple values of the same type. Here, we are given an array arr[] containing N unsorted elements, and our task ... Read More

Check if a number is a Pythagorean Prime or not in C++

Akansha Kumari

Akansha Kumari

Updated on 24-Jul-2025 18:17:32

978 Views

The Pythagorean primes are prime numbers that can be represented in the form 4n + 1, where n is a non-negative integer. These primes have a special property as they can be expressed as the sum of two square numbers. In other words, a prime number p is called ... Read More

Check if a number is Quartan Prime or not in C++

Akansha Kumari

Akansha Kumari

Updated on 23-Jul-2025 18:48:18

388 Views

The Quartan primes are prime numbers that can be represented as x^4 + y^4. Where x, y > 0. Some Quartan prime numbers are {2, 17, 97, …}.In this article, we will learn how to check whether a number is Quartan Prime or not in C++. Consider the following input ... Read More

Check if a given matrix is Hankel or not in C++

Akansha Kumari

Akansha Kumari

Updated on 23-Jul-2025 18:44:13

224 Views

The Hankel matrix is a square matrix, in which each ascending skew-diagonal or anti-diagonal (from top-right to bottom-left) elements are constant. For example a matrix name M with size 5x5 is given below − ... Read More

What are type specifiers in C++?

Akansha Kumari

Akansha Kumari

Updated on 23-Jul-2025 15:46:50

3K+ Views

In a statically typed language such as C++, type specifiers are keywords that are used to define the type of data that given variables will hold. There are two types of type specifiers: built-in and user-defined type specifiers. Built-in Type SpecifiersThe built-in type specifiers are the basic and predefined data types provided by ... Read More

4Sum in C++

Akansha Kumari

Akansha Kumari

Updated on 23-Jul-2025 15:44:35

600 Views

4SUM ProblemThe 4Sum is one of the problem variations in which we need to find the number of quadruplets present in the array such that their sum is equal to the given target. We are given an array of n integers called nums and a target value, and we have ... Read More

1 2 3 4 5 ... 9 Next
Advertisements