Calculating Factorial in C++

We will use C++ to write programs to calculate the factorial of a number. We will take the number as an input from the user and then print the factorial of that number in the console. We will use two methods to calculate the factorial of the number, the first is by performing iteration with the help of loops, and the second is by using recursion.

Working with C++ Arrays

Arrays in C++ are one of the most important user-defined data types in C++. They can be used to store a large amount of data of the same data type sequentially. C++ also supports N-Dimensional arrays that can be used for problem-solving in scientific computing. For example, we can use the 2-Dimensional array of C++ to create a matrix, and they have wide usage in NLP, Machine Learning, and Artificial Intelligence. If you want to know more about the basics of c++ arrays, you can follow our step-by-step beginner guide on arrays in C++.

Printing Palindrome Pattern in C++

Patterns are often considered an effective method to learn logic building and acquire expertise in manipulating loops. Printing a palindrome pattern is amongst the favorite questions of an interviewer. To counter that, in this article, we will discuss palindrome patterns of letters and numbers.

Fibonacci Series in C++ and Python

C++ and Python are the most popular languages of this time. They both are used in Artificial Intelligence, Machine Learning, Scientific Programming, Developing Software, etc. C++ is a swift language, and it is also similar to C and close to the hardware, so we can write very efficient and fast programs using it.

Printing Matrix Spiral in C++

Before coding the example of a matrix spiral, we need to see how to create a matrix in C++. To create a matrix in C++, we use a 2D array, and we can declare it as the following.

Hollow Diamond Pattern Program in C++

As a C++ professional programmer, you might often come across this challenge during an interview case or even a programming solution challenge. Therefore, we must equip ourselves with this knowledge of how to code a hollow diamond pattern in C++.

Linked List in C++

It’s always never too late to learn new skills. Let’s take some time and look at this fundamental and useful data structure in our daily lives. What is a linked list in C++? It’s a type of data structure that uses pointers for its implementation. It will be very wise for you to also look at pointers if you have not yet since they will give you a deeper understanding of the Linked List. Nevertheless, I will try as much as possible to make this simple and understandable.

How to convert string to char array in C++

Converting a string to a character array is simple and straightforward, but before we jump to the solution, we need to identify a few built-in functions we would be using from the string library.

How to convert roman numerals to decimals in C++

To have an in-depth understanding of converting roman numerals into decimals, we must first have an idea about the roman numeral system. It is a number system where letters are used to denote numbers. Modern roman numerals consist of 7 symbols, and each of them has a fixed decimal value.

Stack in C++

The true essence of learning a language is getting familiar with data structures in that language. Data Structure is a fundamental concept as programming is all about storing data, retrieving data, and dealing with data types. The most common data structure we come across is an array. An array is a basic abstract data type that linearly holds data.

Arrays in C++ with examples

Arrays are a widespread concept in many programming languages. Before heading into the concepts, let’s understand what Arrays are and why they are so important? Suppose we need to make a program to store the names of five fruits, namely orange, mango, banana, apple, and grapes. All the fruits would have the same type, i.e., a string but stored in different 5 variables. We use an array to solve this problem, so an array is a data structure that holds fixed-size elements of the same data type.

Object-Oriented Principles in C++

In the past, we showed we published the basics of object-oriented programming in C++. That should help you get started. Today we look at the oriented principles. It’s basically the way we program our classes and access the objects. There are four object-oriented principles that you should be aware of, namely: