Akansha Kumari has Published 81 Articles

What are Character Literals in C++?

Akansha Kumari

Akansha Kumari

Updated on 04-Jun-2025 15:33:58

873 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 ... Read More

What are local variables and global variables in C++?

Akansha Kumari

Akansha Kumari

Updated on 04-Jun-2025 13:34:59

9K+ Views

In C++, the scope defines the region within which a variable can be accessed. So, if broadly speaking, there are three main places where variables can be declared and accessed: Inside a function or a block, which are called local variables. In ... Read More

What are C++ Manipulators (endl, setw, setprecision, setf)?

Akansha Kumari

Akansha Kumari

Updated on 04-Jun-2025 13:33:54

4K+ Views

Manipulators in C++ are like helper functions that are designed to format and modify the input and output streams of your code. This is done by using the insertion () operators, and are defined in and header files. There are various types of manipulators that exist in C++, ... Read More

What are Boolean Literals in C++?

Akansha Kumari

Akansha Kumari

Updated on 02-Jun-2025 19:36:40

464 Views

Boolean Literals In C++, Boolean literals are the values, which are assigned to variables of the Boolean data type. A Boolean literal represents two values: true or false,  which are internally represented as 1 and 0 respectively. A Boolean literal occupies 1 byte (8 bits) of memory and is used ... Read More

fmax() and fmin() in C++

Akansha Kumari

Akansha Kumari

Updated on 02-Jun-2025 15:18:31

582 Views

The fmax() and fmin() functions in C++ are used to check the maximum or minimum of two floating-point numbers. These functions are defined under the header file of the C++ standard library. C++ fmax() function The fmax() is used to compare and return the larger of two floating-point values. ... Read More

What are the advantages of C++ Programming Language?

Akansha Kumari

Akansha Kumari

Updated on 29-May-2025 19:06:43

4K+ Views

C++ is a general-purpose and high-level programming language, which was created by Bjarne Stroustrup in the early 1980s. It is an extension of the C programming language, which means it has features of C (procedural programming) with the added feature of object-oriented programming. It has become a widely used language, ... Read More

How to call a JavaScript function from C++?

Akansha Kumari

Akansha Kumari

Updated on 29-May-2025 19:05:56

1K+ Views

Calling a JavaScript function directly from C++ depends on the environment and the system; for this, make sure you have embedded a JavaScript engine or integrated C++ with JavaScript. In this article, we will be using Emscripten (C++ to JavaScript in WebAssembly) to call a JavaScript function from C++. For ... Read More

C++ set for user defined data type?

Akansha Kumari

Akansha Kumari

Updated on 29-May-2025 18:57:55

518 Views

A set is a data structure that is used to store distinct values (meaning no two elements can have the same value) in ascending or descending order. Set for User-defined Data TypesWe can directly use sets for built-in data types, but for user-defined data types, values cannot be directly stored, ... Read More

Data Type Ranges and their macros in C++

Akansha Kumari

Akansha Kumari

Updated on 29-May-2025 18:56:08

2K+ Views

In some cases, especially in competitive programming, we may need to specify the minimum or maximum value of a specific datatype. In C++, each data type has a different memory range under which we can define and declare the value of that data type. But it becomes difficult to remember ... Read More

C++ Operators with Precedence and Associativity

Akansha Kumari

Akansha Kumari

Updated on 29-May-2025 15:41:53

4K+ Views

In C++, operator precedence and associativity both work together to define the order of evaluation in an expression. Order precedence determines which operators need to be evaluated first according to precedence, whereas associativity defines the direction of operators to be evaluated of the same precedence. Operator precedence Operator precedence refers ... Read More

Advertisements