Akansha Kumari has Published 81 Articles

The mutable storage class in C++

Akansha Kumari

Akansha Kumari

Updated on 12-May-2025 19:38:58

2K+ Views

The mutable storage class in C++ is a property that gives you access to modify the non-static data members (not static data members) of a class, even when the object is declared as constant. This is mainly useful for scenarios where the data needs modification without affecting the logical state of ... Read More

C++ Standard Library Header Files

Akansha Kumari

Akansha Kumari

Updated on 12-May-2025 19:38:45

2K+ Views

Standard Library header files are the predefined files in C++, which are part of the built-in library. It consists of declarations for functions, classes, objects, and macros. These header files give you access to perform various operations like input/output, string manipulation, containers, algorithms, math operations, and many more. Here is ... Read More

How to compile and run the C++ program?

Akansha Kumari

Akansha Kumari

Updated on 12-May-2025 19:38:32

172K+ Views

The C++ programming language is a set of instructions that tells the compiler how to perform specific tasks. These instructions consist of functions and statements, which, when compiled and executed, tell the computer what action to perform.  Prerequisite To compile and execute the program following prerequisites need to be met. ... Read More

Rules for operator overloading in C++

Akansha Kumari

Akansha Kumari

Updated on 12-May-2025 19:38:14

15K+ Views

Operator overloading in C++ is the feature that allows you to define how operators will behave for user-defined data types like classes and structures. Operator overloading and function overloading both support compile-time polymorphism. In the following article, we will learn the rules that need to be followed for operator overloading. ... Read More

What is dot operator in C++?

Akansha Kumari

Akansha Kumari

Updated on 08-May-2025 18:43:22

2K+ Views

The dot operator (.) in C++ is a member access operator, which is used to access the members (variables and functions) of a class, structure, and union through an object. It allows you to access and manipulate the properties of an object's data members and member functions. The dot (.) operator ... Read More

What is the difference between the dot (.) operator and -> in C++?

Akansha Kumari

Akansha Kumari

Updated on 07-May-2025 19:14:19

3K+ Views

In C++, both dot (.) and arrow (->) operators are used to access members of classes, structures, and unions. But they are used in different scenarios based on how the object is being accessed. In this article, we will learn the differences and uses of these two operators in C++. ... Read More

What are cin, cout and cerr streams in C++?

Akansha Kumari

Akansha Kumari

Updated on 06-May-2025 19:07:14

3K+ Views

The cin, cout, cerr, and clog are streams that handle standard input and output stream objects, which are defined in an header file. Standard Output Stream (std::cout) The cout is an object of class ostream that represents the standard output stream oriented to narrow characters (of type char). It ... Read More

How to initialize memory with a new operator in C++?

Akansha Kumari

Akansha Kumari

Updated on 06-May-2025 18:36:44

1K+ Views

In C++, the new operator is mainly used for allocating memory on the heap, but to initialize that memory, you need to explicitly declare and provide a value to it.Here, the new operator dynamically allocates memory for a variable or object during runtime and returns a pointer to the allocated ... Read More

What is the difference between cerr and clog streams in c++?

Akansha Kumari

Akansha Kumari

Updated on 05-May-2025 18:39:52

977 Views

cerr and clog are both objects of the stderr(standard error) stream, which is used to display error messages or diagnostics. In this article, we will learn the difference between these two in more detail. Further, the description of the cout object is also given to get a clearer picture. Unbuffered ... Read More

What is double address operator(&&) in C++?

Akansha Kumari

Akansha Kumari

Updated on 05-May-2025 17:06:22

20K+ Views

&& is a new reference operator defined in the C++11 standard. int&& a means "a" is an r-value reference. && is normally only used to declare a parameter of a function. And it only takes an r-value expression.Simply put, an r-value is a value that doesn't have a memory address. ... Read More

Advertisements