Found 6474 Articles for C++

Buffering of Blocks

Raunak Jain
Updated on 10-Jan-2023 18:25:02
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
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

B*-Trees implementation in C++

Raunak Jain
Updated on 16-Jan-2023 16:03:38
B*-Trees: An Optimized Data Structure for Fast Data Retrieval in C++ A B*-tree is a self-balancing tree data structure that is optimized for fast data retrieval. It is a variant of the B-tree, which is a tree data structure that is designed to keep its data sorted and balanced. A B-tree is characterized by the fact that it has a high degree of order, meaning that its nodes are kept sorted in a specific manner. A B*-tree is similar to a B-tree, but it is optimized for even better performance. This is achieved through the use of a number of ... Read More

C++ Program To Find the Trace and Normal of a given Matrix

Arnab Chakraborty
Updated on 14-Dec-2022 15:09:38
Several applications greatly benefit from the use of 2-dimensional arrays or matrices. Numbers are stored in rows and columns of matrices. Using multi-dimensional arrays, we may define 2D matrices in C++ as well. In this post, we'll look at how to use C++ to determine the Normal and Trace of a given matrix. The square root of the total number of elements in the matrix is what is known as the Normal. The trace is made up of all the components that make up the main diagonal. Let's look at the representation of the algorithm in C++ code. Matrix Trace ... Read More

C++ Program to Compute the Sum of Diagonals of a Matrix

Arnab Chakraborty
Updated on 14-Dec-2022 16:04:28
The utilization of 2-dimensional arrays or matrices is extremely advantageous for several applications. Matrix rows and columns are used to hold numbers. We can define 2D matrices in C++ using multi-dimensional arrays as well. In this article, we'll look at how to use C++ to calculate the diagonal sum of a given square matrix. The matrices have two diagonals, the main diagonal and the secondary diagonal (sometimes referred to as major and minor diagonals). The major diagonal starts from the top-left corner (index [0, 0]) to the bottom-right corner (index [n-1, n-1]) where n is the order of the square ... Read More

C++ Program to Compare two strings lexicographically

Arnab Chakraborty
Updated on 14-Dec-2022 14:47:45
Lexicographic string comparison states the strings are compared in dictionary order. For example, if two strings ‘apple’ and ‘appeal’ are there, the first string will come next because the first three characters ‘app’ is the same. Then for the first string, the character is ‘l’ and in the second string, the 4th character is ‘e’. Since ‘e’ is shorter than ‘l’, it will come first if we arrange them in lexicographic order. Before arranging, the strings are compared lexicographically. In this article, we will see different techniques to compare two strings in a lexicographic manner using C++. Using compare() functions ... Read More

C++ Program to Print first letter of each word using regex

Arnab Chakraborty
Updated on 14-Dec-2022 14:45:07
A useful tool for string operations is regex. This may be found in virtually all high-level current programming languages, including C++. Regular expressions (Regex) are utilized as general-purpose search patterns. For instance, by constructing a straightforward string known as a regular expression, we may implement password validation logic with at least one capital, one lowercase, one number, one special character, and a total length of at least 8 characters. In this tutorial, we'll look at how to use C++ to display only the first letters of words included within a specified string. Here, we'll look at a sentence that uses ... Read More

C++ Program to Swapping Pair of Characters

Arnab Chakraborty
Updated on 14-Dec-2022 14:39:09
A string is a group of characters. They can be described as character arrays as well. An array of characters can be thought of as strings, and each string has a set of indices and values. The switching of characters at two specified indices in a string is one of the modifications we can sometimes make to strings. In this article, we will see how to swap two characters in a string from two given indices using C++. Syntax char temp = String_variable[ ] String_variable[ ] = String_variable[ ] String_variable[ ] = temp Using indices, ... Read More

C++ Program to Replace a Character at a Specific Index

Arnab Chakraborty
Updated on 14-Dec-2022 14:37:16
Strings are a collection of characters. We can also say them as character arrays. Considering an array of characters as strings, the strings have specified indices and values. Sometimes we can perform some modification on strings, one such modification is replacing characters by providing a specific index. In this article, we will see how to replace a character from a specific index inside a string using C++. Syntax String_variable[ ] = In C++ we can access the string characters using indices. Here to replace a character with some other character at a specified index, we simply ... Read More

C++ Program to Iterate Over an Array

Arnab Chakraborty
Updated on 14-Dec-2022 14:34:45
Arrays are data of the same type stored in contiguous locations in memory. To access or address an array, we use the starting address of the array. Arrays have indexing, using which we can access the elements of the array. In this article, we take a look at methods to iterate over an array. This means accessing the elements that are present in an array. Using for loop The most common method of iterating over an array is using for loops. We use a for loop to iterate through an array in the next example. One thing is to be ... Read More
1 2 3 4 5 6 7 ... 648 Next
Advertisements