Akansha Kumari

Akansha Kumari

Hi, I am Akansha, a Technical Content Engineer with a passion for simplifying complex tech concepts.

About

Hi, I am Akansha, a Technical Content Engineer with a passion for simplifying complex tech concepts. I specialize in creating technical, accurate, and SEO-optimized content that helps learners, developers, and professionals understand programming languages and other computer-related concepts.

54 Articles Published

Articles by Akansha Kumari

Page 3 of 6

How to write the first C++ program?

Akansha Kumari
Akansha Kumari
Updated on 15-Jul-2025 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 procedure of writing our first C++ program. Prerequist For this, make sure that your computer consists of the following two. C++ Compiler Text Editor or IDE Get a C++ Compiler It is a system that translates the source code (written ...

Read More

C++ Programming Language Features

Akansha Kumari
Akansha Kumari
Updated on 15-Jul-2025 1K+ 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 valid to C++ program.Top Features of C++ Programming Language C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. In this following article we will discuss some of the features of C++ that make it stand out among other programming languages: 1. ...

Read More

C++ Rule Of Three.

Akansha Kumari
Akansha Kumari
Updated on 15-Jul-2025 1K+ 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 special member functions of class and are responsible for managing resources such as dynamic memory, file handles, sockets, etc. And if one of them is defined explicitly, means that class is managing those resources manually (like memory using new/delete), and if we fail to define others then it can lead to ...

Read More

enum vs. const vs. #define in C/C++

Akansha Kumari
Akansha Kumari
Updated on 16-Jun-2025 959 Views

The #define, const, and Enum are all used for declaring constant values, but their behaviours and use cases differ. The #define is a preprocessor directive, which is used to define a macro (it is a string or name, in which you can assign a constant value), whereas const is a keyword with which you can declare a variable with a constant value. Whereas, an Enum is a special user-defined data type that represents a group of constants. In the following article, we will learn about all three in detail. Enumeration (Enum) An Enumeration (or Enum) is a user-defined data type ...

Read More

What are signed and unsigned keywords in C++?

Akansha Kumari
Akansha Kumari
Updated on 13-Jun-2025 3K+ Views

In C++, the keywords signed and unsigned are used to specify that a given variable can hold negative values or only positive values. In this article, we will learn the differences between these two in more detail. C++ signed Keyword The signed keyword specifies that the given variable can hold both positive and negative values. Most integers, like int, short, long, etc, are by default signed (meaning they can store both positive and negative values). When an integer is represented in binary form, the most significant bit (MSB) or the leftmost bit represents the sign of the integer. When the most significant ...

Read More

How to get the IP Address of local computer using C/C++?

Akansha Kumari
Akansha Kumari
Updated on 11-Jun-2025 10K+ Views

In this article, we will see how to get the Host name and IP address of the local system in an easier way using C and C++ program.  Getting IP Address of Local Computer For this, some standard networking functions are available in socket programming with header files like on Windows and , , on Linux. In this article we will mainly discuss three commonly used functions: Sr.No ...

Read More

fdim() in C++

Akansha Kumari
Akansha Kumari
Updated on 10-Jun-2025 312 Views

C++ fdim() Function The fdim() function returns the positive difference between two floating-point values. For example, if we have two arguments, a and b, respectively, then it will return a-b if a > b, else it will return 0. This function is defined under or header files and supports float, double, and long double overloads. Syntax Here is the following syntax for fdim() function in C++. In the following syntax, data_type defines the type of data it will take as input and return. data_type fdim(data_type value_1, data_type value_2); Parameters This method accepts two parameters of floating type (i.e., can ...

Read More

Structure Sorting in C++

Akansha Kumari
Akansha Kumari
Updated on 09-Jun-2025 2K+ Views

A structure in C++ is a user-defined data type, which is used to group and store variables of different data types under a single name. In this article we will see how to sort an array of structures using conditions on member variables. For this we will be using the sort() function which is defined under header file. Syntax Here is the following syntax of sort() function. sort(start_index, end_index, comparison_function); start_index is an iterator (or pointer) to the first element of the array of structures.end_index is an iterator (or pointer) to one past the last element (means last_index + ...

Read More

Difference between void main and int main in C/C++

Akansha Kumari
Akansha Kumari
Updated on 09-Jun-2025 39K+ Views

The main() function in C and C++ is anentry point of a program from where the execution begins. And there are two common ways available to define the main function; int main() and void main(). In this following article we will learn the differences between these two in detail. The main() function is the same like other functions, which takes arguments and returns some value. A point to keep in mind is that the execution of a program always begins from the main() function. When a program runs, the operating system calls the main() and the value returned from it ...

Read More

What are Character Literals in C++?

Akansha Kumari
Akansha Kumari
Updated on 04-Jun-2025 1K+ Views

In C++, character literals are the constant values, which are assigned to variables of the character data type. These values are represented by a character enclosed within single quotation marks. There are mainly five types of character literals: Narrow-character literals Wide-character literals. UTF-8 character literals UTF-16 character literals UTF-32 character literals Narrow-character Literals These character literals are of type char, which represents single-byte character. It stores characters from the ASCII table, which includes values ranging from 0 to ...

Read More
Showing 21–30 of 54 articles
Advertisements