Posts

For Loop In C++ Programming Language

Image
  For Loop In C++ Programming Language In Programming languages looping statements are used with the help of these looping statements we can repeat some block of code according to our requirement of the program.  In C++ programming language we also use these looping statements, these looping statements are also referred as controlled structure . In this blog post we are going to cover for loop statement which is used to execute a block of code repeatedly for a specific number of times. The for loop is " entry controlled " or " pre-tested " loop which means that the condition is checked before the code inside the loop ever runs. We use for loop when we know exactly how many times the loop will going to run. Basic syntax and working of for loop in C++ programming language Syntax of for loop  for (initialization; condition; increment) { // code to be executed here. } Working of for loop in C++ programming language Now let us look at the basic ...

Switch statement in C++ programming language

Image
 Switch statement in C++ programming language In todays blog post we are going to cover a very important decision making statement which is used to execute or run different blocks of code based on the value of the expression. Always remember that the switch statement is used as an alternate to the if else if ladder statement in C++ programming language. The switch statement is more cleaner and is considered to be more efficient as compared to the if else if ladder statement. And just keep this thing in mind that, the expression value that is used with in the switch statement it must be an integer value, or a character value, or enumeration type. In programming languages we have studied about conditional statements in which accross given set of conditions we chose any specific condition and run the block of code as per that condition. There are other techniques that we call control statement or decision making statements.  The Switch statement is one of the very important ex...

If Else If ladder statement in C++ Programming Language

Image
 If Else If ladder statement in C++ Programming Language Today in this blog post we are going to cover another very important conditional statement which is known as if else-if ladder statement. In C++ programming language we have studied about the if statement, if else statement, and today our focus is on if else if ladder statement in C++ programming language. The if else if ladder statement is a multi-way decision making structure with the help of which we can test multiple conditions in a sequential manner from top to bottom. And in a very simple way if any if any of the else if conditions become true it will execute that specific piece of code, and ignores the remaining else if conditions without even checking them. In programming languages we have conditional statements or decision making statements that we can use in order to make decisions among multiple conditions. Today we are going to cover a simple conditional statement which is known as if-else-if ladder statement in ...

if and if else statement in C++ programming language

Image
  If and if-else statements in C++ programming language In this blog post we will look at the basic working of if and if-else statement in C++ programming language. These if and if-else statements are also referred as conditinal statements in programming languages. But today we will study them under the context of C++ programming. In C++ programming language we use if and if-else to run a specific peace of code under one condition and another peace of code for some different condition. We also refer them as decision statements . Types of if statements in C++ programming language If we talk about types of if statements there are mainly four types 1) if statement 2) if-else statement 3) if else-if ladder statement 4) nested if statements But in this blog post we will cover the if and if-else statements. Syntax of if statement and basic working of if statement Syntax of if statement if (condition) { // code to be executed here. } Working of if st...

How To Write Hello World Program In C++ Programming Language

Image
  How To Write a Hello World Program In C++ Programming Language Today in this blog post we are going to cover about the C++ programming language. C++ is a high level programming language, with the help of C++ programming we can build different kind and types of applications. C++ is a high performance, general-purpose programming language, developed by Bjarne stroustrup at AT&T Bell labs in 1979. The C++ programming is basically an enhancement or extension of C programming language. There are some main features in C++ programming, which are, it is an object-oriented programming language, it uses exception handling, we are going to look at some more important features of C++ language in upcomming sections. For now keep this thing in mind that with the help of C++ programming language we can develop, 1) Desktop Applications. 2) Game Development. 3) Operating Systems. 4) Embedded Systems. 5) Device Drivers. 6) Client-Server Applications. 7) etc. I hope now you can understand the v...

What is File Handling in the C Programming Language

Image
  What is File Handling in the C Programming Language Today in this blog post we are going to discuss about file handling in C programming language. And we are also going to cover that what are the uses of file handling and why do we need file handling in C programming language. Till now upto this point we have studied about various programs in C programming. So if we talk about basic use and need of file handling, it allows us to store data in a permanent secondary storage devices just like hard disk drives (HDD) in old systems and now in Solid State Drive (SSD) which is used in modern computers and is much more faster as compared to HDD. Some times we want the data produced by our program to be saved so that we can use that data later on, and there comes the need of file handling in C programming language. It enables us to create, read, update, and delete the files on the local file system.  In programming languages, we sometimes encounter situations where we need to store d...

How to use Structures in C Programming Language

Image
  How to use Structures in C Programming Language Today in this blog post we are going to cover a simple data structure which is known as structure (struct) in C programming language. Basically it is a user defined data type with the help of which we can group related variables of different data types together under a single name known as a structure . With the help of structures we can merge or combine different data types like integer, characters, double, float, arrays, etc. into a single record. In programming languages like C, C++, C#, etc., sometimes we encounter a situation where we need to store different variables with different datatypes, but these variables are related to one object or instance. In such situations, we use data structures.  Today, we are going to discuss a simple technique that will help us store related variables in one place, namely, structures . We will look at how structures are used in the C programming language to help us achieve our target. ...

Popular posts from this blog

How to Download and Install Microsoft visual studio community 2022 for free

For Loop In C++ Programming Language

Hello World Program In C Programming Language