C++

Level Order Traversal in a Binary Tree — step-by-step Programming tutorial on Progressive Robot

Level Order Traversal in a Binary Tree

URL: https://www.progressiverobot.com/level-order-traversal-in-a-binary-tree/ Level Order Traversal is one of the methods for traversing across a Binary Tree. In this article, we shall look at how we can implement this algorithm in C/C++. But before that, let us have our concepts covered. Building the concepts A Binary Tree is a data structure where every node has at-most […]

Read more
Using the puts() function in C/C++ — step-by-step Programming tutorial on Progressive Robot

Using the puts() function in C/C++

URL: https://www.progressiverobot.com/puts-function-c-plus-plus/ Introduction Hello reader! Today in this tutorial we are going to discuss about the vastly used puts() function in for both C and C++ programming languages. Even though the printf() and cout functions in both C and C++ are prominent for printing variables, numbers, lines, etc. they ultimately lack behind while printing strings […]

Read more
How to Create a Random Number Generator in C++ — step-by-step Programming tutorial on Progressive Robot

How to Create a Random Number Generator in C++

URL: https://www.progressiverobot.com/random-number-generator-c-plus-plus/ In this article, we'll go over the functions needed to create a random number generator in C++. In the world of computers, random numbers form an essential component to add the flavor of anonymity and security. A random number generator forms the backbone of creating pseudo-random numbers. The idea behind pseudo-random numbers is […]

Read more
How to Return an Array in a C++ Function — step-by-step Programming tutorial on Progressive Robot

How to Return an Array in a C++ Function

URL: https://www.progressiverobot.com/return-array-in-c-plus-plus-function/ Introduction In this tutorial, we are going to understand how we can return an array from a function in C++. Methods to Return an Array in a C++ Function Typically, returning a whole array to a function call is not possible. We could only do it using [pointers](/community/tutorials/pointers-in-c-and-c-plus-plus). Moreover, declaring a function with […]

Read more
3 Ways to Compare Strings in C++ — step-by-step Programming tutorial on Progressive Robot

3 Ways to Compare Strings in C++

Introduction In this article, you will learn methods to compare strings in C++. Strings in C++ can be compared using one of the following techniques: String strcmp() function built-in compare() function C++ Relational Operators (==, !=) 1. Using the String strcmp() function in C++ C++ String has built-in functions for manipulating data of String type. […]

Read more
Convert String to Char Array and Char Array to String in C++ — step-by-step Programming tutorial on Progressive Robot

Convert String to Char Array and Char Array to String in C++

In this article, we will be focusing on the different ways to convert String to char array and char array to String in [C++](/community/tutorials/c-plus-plus). While dealing with String data, we may need to convert the string data items to character array and vice-versa. This tutorial will help you solve exactly that. Convert String to Char […]

Read more
Using sort() in C++ std Library — step-by-step Programming tutorial on Progressive Robot

Using sort() in C++ std Library

URL: https://www.progressiverobot.com/sort-in-c-plus-plus/ Introduction Hey there! Today we are going to discuss the sort() function in the std library in C++. For basics, Sorting is any process of ordering items systematically. These items could be elements of a sequence or any [data structure](/community/tutorials/data-structure-algorithms). In C++, the standard library provides a pre-defined and ready to use function […]

Read more
How to use the execvp() function in C/C++ — step-by-step Programming tutorial on Progressive Robot

How to use the execvp() function in C/C++

In this article, we'll take a look at using the execvp() function in C / C++. In UNIX, the execvp() function is very useful if you want to run another program using our C program. NOTE: This function is applicable only to UNIX based Operating Systems. It doesn't work on Windows Let's take a look […]

Read more
Sorting a Vector in C++ — step-by-step Programming tutorial on Progressive Robot

Sorting a Vector in C++

URL: https://www.progressiverobot.com/sorting-a-vector-in-c-plus-plus/ Introduction In this tutorial, we are going to focus on Sorting a Vector in C++. Sorting is one of the vastly performed operations in any programming language. Similarly, in C++ too, there are several algorithms following which we can sort any data structure. For [vectors](/community/tutorials/vectors-in-c-plus-plus), in particular, we can perform sorting operations in […]

Read more
CHAT