Akansha Kumari has Published 81 Articles

Absolute distinct count in a sorted array in C++?

Akansha Kumari

Akansha Kumari

Updated on 22-Jul-2025 15:53:47

366 Views

An array is a data structure that is used to store elements of the same data type, where a sorted array, in which the elements are arranged in ascending or descending order. The absolute distinct count gives the count of absolute (non-negative or unsigned) values of distinct (unique) elements present ... Read More

3Sum Smaller in C++

Akansha Kumari

Akansha Kumari

Updated on 21-Jul-2025 18:50:37

389 Views

The 3Sum Smaller is one of the problem variations in which we need to find the number of triplets in an array such that their sum is less than a given target. We are given an array of n integers called nums and a target value, and we have to ... Read More

A C Puzzle in C Programming?

Akansha Kumari

Akansha Kumari

Updated on 18-Jul-2025 16:03:43

1K+ Views

C programming puzzles are small but tricky coding problems, which are designed to challenge and to understand the C programming language in a better way. Problem Statement We are given two numbers, and our task is to combine them in such a way that the second integer is placed before ... Read More

How to write a short literal in C++?

Akansha Kumari

Akansha Kumari

Updated on 15-Jul-2025 17:35:04

975 Views

In the following article, we will learn about short literals in C++. In both C and C++, different data types have different literals. A literal is a fixed constant value, which is assigned to the variables of different data types. For example, here is a list of different data types ... Read More

What are local variables in C++?

Akansha Kumari

Akansha Kumari

Updated on 15-Jul-2025 17:31:11

511 Views

The variables, which are declared inside a function, block or method are known as local variables in C++. Their scope is limited to that function or block and can be accessed and used only within the area or scope they are defined. You cannot access or use them outside their ... Read More

How to write the first C++ program?

Akansha Kumari

Akansha Kumari

Updated on 15-Jul-2025 17:30:42

18K+ Views

C++ is a high level programming language that is used to develop applications, work with operating systems, and much more. It is an extension of the C language, which combines both procedural programming (available in C) and object oriented programming. In this article, we will learn step by step the ... Read More

C++ Programming Language Features

Akansha Kumari

Akansha Kumari

Updated on 15-Jul-2025 17:29:49

803 Views

C++, also said to be a middle-level language, as it is a combination of both high-level features like abstraction with low-level language features like memory manipulation capabilities of assembly. It is a superset of C, as it compromises both C with object-oriented, therefore any valid C program will also be ... Read More

C++ Rule Of Three.

Akansha Kumari

Akansha Kumari

Updated on 15-Jul-2025 17:12:43

882 Views

The rule of three in C++ states that, if a class in C++ has any one (or more) of the following, then it should define all three. Destructor Copy Constructor Copy Assignment Constructor These three are ... Read More

Uninitialized primitive data types in C/C++ Program

Akansha Kumari

Akansha Kumari

Updated on 15-Jul-2025 17:10:46

315 Views

In this section we will see when we declare a variable that is un-initialized, then which value they hold in C or C++ language.What Happens When You Don’t Initialize Variables? In C and C++, when a variable is declared inside a function (i.e., as a local variable) but not explicitly ... Read More

What is volatile keyword in C++?

Akansha Kumari

Akansha Kumari

Updated on 15-Jul-2025 17:06:41

12K+ Views

C++ Volatile KeywordIn C++, the volatile keyword is a type qualifier that tells the compiler that the value of a variable may be changed at any time unexpectedly, so it should not optimize access to that variable. This change in a variable may be influenced by any external factors such as hardware, ... Read More

Advertisements