Akansha Kumari has Published 54 Articles

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

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

Can a C++ variable be both const and volatile?

Akansha Kumari

Akansha Kumari

Updated on 29-May-2025 15:39:31

2K+ Views

Yes, In C++ both const and volatile keywords can be applied together in a variable. But it is used in situations like a read-only hardware register, or an output of another thread. In C++, they both are type qualifiers, which are used for different purposes in programming. In this article ... Read More

What does the restrict keyword mean in C++?

Akansha Kumari

Akansha Kumari

Updated on 29-May-2025 15:38:35

2K+ Views

There's no such keyword in C++. A list of C++ keywords can be found in section 2.11/1 of the C++ language standard. It is a keyword in the C99 version of the C language and not in C++. In C, A restrict qualified pointer (or reference) is basically a ... Read More

Tokens vs Identifiers vs Keywords in C++

Akansha Kumari

Akansha Kumari

Updated on 28-May-2025 19:05:08

1K+ Views

In C++, tokens, identifiers, and keywords all are fundamental elements of a program. Tokens are the smallest units of code which are combine together to form complete program, where both keywords and identifiers are the types of tokens. The keywords are reserved words in the language, where each provides separate ... Read More

What is the difference between #define and const Keyword in C++?

Akansha Kumari

Akansha Kumari

Updated on 28-May-2025 19:04:05

533 Views

In C++, both #define and const are used to define constants in a program. The #define is a preprocessor directive that creates macros with their fixed values whereas const is a keyword which declare value of variable as constant, meaning its value cannot be changed after intialization. Therefore they have ... Read More

Getting Started with C++ in Visual Studio

Akansha Kumari

Akansha Kumari

Updated on 22-May-2025 19:47:44

4K+ Views

In this article, you will learn the setup to build and compile the C++ code in Visual Studio. Here you will become familiar with many of the tools and dialog boxes that you can use when you develop applications in C++. In this, we'll create a "Hello, World" style console ... Read More

What does an auto keyword do in C++?

Akansha Kumari

Akansha Kumari

Updated on 15-May-2025 17:09:35

8K+ Views

The auto keyword in C++ is used to automatically determine the type of variables from their initializer. This means you don’t need to explicitly tell the compiler the variable's data type. It lets the compiler determine the variable's type during compile time.C++ auto KeywordAuto was a keyword that C++ "inherited" ... Read More

What is arrow operator in C++?

Akansha Kumari

Akansha Kumari

Updated on 15-May-2025 16:19:06

3K+ Views

The array operator provides the direct access to array elements using their index. What is Array Operator in C++? The arrow operator in C++ is also known as the member access operator, which is used to access a member of a class, structure, or union with the help of a ... 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

Advertisements