Posts

Showing posts with the label while loop in the C programming language

What is Recursion in C++ programming language

Image
 What is Recursion in C++ programming language Today in this blog post we will cover the concept of Recursion in C++ programming language for  beginners. So what is Recursion? And what is the use of Recursion in programming languages? We will cover the answer of these questions shortly. For now let us look at the basic introduction of Recursion. Recursion is a concept in which the function calls itself with in its own body, and breaks the complex problems into smaller and more manageable parts. So the first question was what is recursion? Basically Recursion is a method or technique which is used in programming languages and in this method the function calls itself. It means the function is called with in its own body. We will cover this concept with simple programming example which will make the concept of recursion crystal clear to the audience. The Second question was what is the use of Recursion in programming languages? Recursion simply breaks down complex problems or pro...

while loop in c programming language

Image
  while loop in the C programming language In computer programming languages there is a concept of control flow statements. In control flow statements we specify some conditions and based on those conditions whether they are true or false we run some iterative piece of code if the condition is true and terminate the control statement if the condition is false.  There are mainly three types of control flow statements that we use in our programs to get the desired result, these three types of control statements are Three types of Control flow statements 1) do-while loop 2) while loop 3) for loop In today's post, we will discuss the while loop control statement. while loop is also known as a pre-tested loop in which before running the piece of code the condition is examined first. If the condition is true only then the while loop will execute and if the condition is false then the while loop statement terminates. In these control statements, the piece of code ...