Day: March 24, 2021

C++ for Beginners: Passing Array to a Function in C++ Programming

(C++ programming Example for Beginners) Passing Array to a Function in C++ Programming In this tutorial, we will learn how to pass a single-dimensional and multidimensional array as a function parameter in C++ with the help of examples. In C++, we can pass arrays as an argument to a function. And, also we can return …

C++ for Beginners: C++ Multidimensional Arrays

(C++ programming Example for Beginners) C++ Multidimensional Arrays In this tutorial, we’ll learn about multi-dimensional arrays in C++. More specifically, how to declare them, access them, and use them efficiently in our program.   In C++, we can create an array of an array, known as a multidimensional array. For example: int x[3][4]; Here, x is a two-dimensional …

C++ for Beginners: C++ Storage Class

(C++ programming Example for Beginners) C++ Storage Class In this article, you’ll learn about different storage classes in C++. Namely: local, global, static local, register and thread local.   Local Variable A variable defined inside a function (defined inside function body between braces) is called a local variable or automatic variable. Its scope is only limited to …

C++ for Beginners: C++ Function Overloading

(C++ programming Example for Beginners) C++ Function Overloading In this tutorial, we will learn about the function overloading in C++ with examples. In C++, two functions can have the same name if the number and/or type of arguments passed is different. These functions having the same name but different arguments are known as overloaded functions. …

C++ for Beginners: C++ switch..case Statement

(C++ programming Example for Beginners) C++ switch..case Statement In this tutorial, we will learn about switch statement and its working in C++ programming with the help of some examples. The switch statement allows us to execute a block of code among many alternatives. The syntax of the switch statement in C++ is: switch (expression) { case constant1: // code …

C++ for Beginners: C++ continue Statement

(C++ programming Example for Beginners) C++ continue Statement In this tutorial, we will learn about the continue statement and its working with loops with the help of examples. In computer programming, the continue statement is used to skip the current iteration of the loop and the control of the program goes to the next iteration. The syntax …

C++ for Beginners: C++ break Statement

(C++ programming Example for Beginners) C++ break Statement In this tutorial, we will learn about the break statement and its working in loops with the help of examples. In computer programming, the break statement is used to terminate the loop in which it is used. The syntax of the break statement is: break; Working of C++ break Statement Working …