Found 7197 Articles for C++

Locate unused structures and structure-members

Satish Kumar
Updated on 03-Mar-2023 15:12:51

886 Views

Structures in programming languages like C and C++ are a collection of related data fields, which can be accessed and manipulated as a single entity. They are often used to group related data items into a single variable, making it easier to manage and work with complex data structures. However, as code bases grow and evolve over time, it is not uncommon for structures and their members to become unused or redundant. These unused structures and members can clutter code and make it more difficult to understand, maintain, and update. In this article, we will discuss some ways to locate ... Read More

Corrupt stack problem in C, C++ program

Satish Kumar
Updated on 03-Mar-2023 15:05:25

3K+ Views

Introduction The corrupt stack problem is a common issue that programmers encounter while developing software in C and C++ programming languages. This problem can arise due to a wide range of reasons and can cause severe problems in functioning of program. In this article, we will explore corrupt stack problem in detail and look at some examples of how it occurs. What is a Stack in C and C++? Before we discuss corrupt stack problem, we need to understand what a stack is. In C and C++, a stack is a data structure that allows data to be stored and ... Read More

Reverse a Stack using Queue

Sonal Meenu Singh
Updated on 22-Feb-2023 12:33:50

2K+ Views

Introduction Both Queue and Stack are linear data structures and are used to store data. Stack uses the LIFO principle to insert and delete its elements. A Queue uses the FIFO principle. In this tutorial, we will learn how to reverse a stack using Queue. Reversing means the last element of the Stack comes to first place and so on. What is Stack? The stack in the data structure is inspired by the stack in real life. It uses LIFO (Last In First Out) logic, which means the element that enters last in the Stack will be removed first. In ... Read More

How to Manage Full Circular Queue Event in C++?

Sonal Meenu Singh
Updated on 22-Feb-2023 12:28:34

351 Views

Introduction Circular Queue is an improvement over a linear queue and it was introduced to address the memory wastage problem in the linear queue. A circular queue uses the FIFO principle for the insertion and removal of the elements from it. In this tutorial, we will discuss the operations of the circular queue and how to manage it. What is Circular Queue? A circular queue is another kind of queue in a data structure, whose front and rear ends are connected with each other. It is also known as Circular Buffer. Its operations are similar to the linear queue, so ... Read More

Extracting last element of a Priority Queue without traversing

Sonal Meenu Singh
Updated on 22-Feb-2023 11:55:01

2K+ Views

Introduction The Priority Queue in C++ is not similar to the normal Queue in the data structure, it has one difference: all its elements have priorities. We can extract its elements by traversing in the Queue. But, here in this tutorial, we are trying a method for extracting the last element of the Priority Queue without traversing. Let’s start… What is Priority Queue? In data structure, the abstract data type is the priority queue. It is a queue where all its elements have some associated priorities. All its elements are removed based on their priorities. Higher priority data are ... Read More

Basic Operations for Queue in Data Structure

Sonal Meenu Singh
Updated on 22-Feb-2023 11:23:18

961 Views

Queue is a collection of different data types and is an important part of data structure, following a particular order to insert and remove elements. In this tutorial, we will understand the basic operations of the queue. What is Queue in Data Structure? A Queue is a linear data structure that resembles a queue in real life. You all have been part of some queue in school, the billing counter, or any other place, where the one entered first will exit first in the queue. Similarly, a queue in data structure also follows the FIFO principle, which defines First In ... Read More

Difference Between Array-Based Queue and List-Based Queue

Sonal Meenu Singh
Updated on 22-Feb-2023 11:17:31

1K+ Views

Introduction A queue is a linear data structure that inserts and removes queue elements in a particular order. We can implement a queue in C++ by using arrays and a linked list. Both queue implementations have their benefits and uses. In this tutorial, we will differentiate the array-based Queues and List Based Queues. What is a Queue? A Queue is a series of elements that uses the FIFO principle for the insertion and deletion of its elements. A queue in Computer Science resembles the queue of real life where the one who enters first in the queue, will be removed ... Read More

How to communicate JSON data between C++ and Node.js ?

Shubham Vora
Updated on 16-Feb-2023 15:51:20

2K+ Views

C++ is a powerful, high-performance language widely used for system-level programming and applications. At the same time, Node.js is an open-source, cross-platform JavaScript runtime environment commonly used for web applications. By understanding the various methods for communicating JSON data between C++ and Node.js, developers can choose the best approach to their specific needs. In this tutorial, we will explore the various ways to communicate JSON data between a C++ application and a Node.js server. Three common approaches: using a RESTful API, using a message queue, and using a WebSocket Users can follow the steps below to communicate JSON data between ... Read More

Buffering of Blocks

Raunak Jain
Updated on 10-Jan-2023 18:25:02

3K+ Views

What is Buffering of Blocks? In computer science, buffering refers to the temporary storage of data in a buffer, or a small, fixed-sized area in memory, while it is being moved from one place to another. When data is transferred from one location to another, it is often necessary to store it temporarily in a buffer to ensure that the transfer is smooth and efficient. There are two main types of buffering: input buffering and output buffering. Input buffering refers to the temporary storage of data that is being received from an external source, such as a file on a ... Read More

B+ Tree in DBMS

Raunak Jain
Updated on 16-Jan-2023 16:02:39

3K+ Views

A B+ tree in DBMS is a specialized version of a balanced tree, a type of tree data structure used in databases to store and retrieve data efficiently. Balanced trees are designed to maintain a roughly equal number of keys at each level, which helps to keep search times as low as possible. B+ trees are a popular choice for use in database management systems(DBMS) because they offer a number of benefits over other types of balanced trees, including faster search times and better space utilization. What are B+ Trees? A B+ tree is a self-balancing, ordered tree data structure ... Read More

Advertisements