C Programming

Using INT_MAX and INT_MIN in C/C++ — step-by-step Programming tutorial on Progressive Robot

Using INT_MAX and INT_MIN in C/C++

URL: https://www.progressiverobot.com/int-max-min-c-plus-plus/ In this article, we'll take a look at using INT_MAX and INT_MIN in C/C++. These are actually useful macros which represent the maximum and minimum integer values. Let's take a look at it, using some examples. Using INT_MAX and INT_MIN INT_MAX is a macro which represents the maximum integer value. Similarly, INT_MIN represents […]

Read more
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
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
Initialize an Array in C — step-by-step DevOps tutorial on Progressive Robot

Initialize an Array in C

URL: https://www.progressiverobot.com/initialize-an-array-in-c/ In this article, we'll take a look at how we will initialize an array in C. There are different ways through which we can do this, so we'll list them all one by one. Let's get started! Method 1: Initialize an array using an Initializer List An initializer list initializes elements of an […]

Read more
fgets() and gets() in C Programming — step-by-step DevOps tutorial on Progressive Robot

fgets() and gets() in C Programming

Introduction We all are familiar with the scanf() function. It is the main function applicable to take basic user inputs. Even though scanf() works great while taking inputs such as integer, character, float etc. It certainly falls behind while taking string inputs containing whitespaces. Let's take a look at an example, #include<stdio.h> int main() { […]

Read more
How To Implement a Sample Hash Table in C/C++ — step-by-step Programming tutorial on Progressive Robot

How To Implement a Sample Hash Table in C/C++

Introduction A hash table in C/C++ is a data structure that maps keys to values. A hash table uses a _hash function_ to compute indexes for a key. You can store the value at the appropriate location based on the hash table index. <!– –> The benefit of using a hash table is its very […]

Read more
Linear Search Algorithm and Implementation in C — step-by-step Programming tutorial on Progressive Robot

Linear Search Algorithm and Implementation in C

URL: https://www.progressiverobot.com/linear-search-algorithm-c/ Linear Search is basically a sequential search algorithm. In this algorithm, the key element is searched in the given input [array](/community/tutorials/arrays-in-c) in sequential order. If the key element is found in the input array, it returns the element. Linear Search Algorithm Linear_Search ( Array X, Value i) Set j to 1 If j […]

Read more
Height of Binary Tree in C/C++ — step-by-step Programming tutorial on Progressive Robot

Height of Binary Tree in C/C++

The height of a Binary Tree is defined as the maximum depth of any leaf node from the root node. That is, it is the length of the longest path from the root node to any leaf node. Let us consider the below Binary Tree. Since the leaf nodes corresponding to the maximum depth are […]

Read more
CHAT