While Loop in C++ Programming Language

Image
  While Loop in C++ Programming Language We have discussed about the entry-controlled loop or pre-tested loop previously in our blog posts. These statements or loops are used to repeat a piece of code for a specific number of times as per our program requirement. We have studied about the for loop already. Today in this blog post we are going to study about the while loop in C++ programming language. And we will look at how this while loop actually works and how we can stop it by making some condition false so that the loop might not run infinitely. We use while loop in C++ program when the number of iterations is not known in advance and depends on the condition. When we know exactly that how many times a loop should run then we use the for loop instead of while loop. Basic Syntax Of While Loop in C++ Programming Language Basic Working Of While Loop In C++ Programming Language Now we are going to discuss about the basic working of while loop in C++ programming....

How to run c project in visual studio community 2022

 How to Run C project in Visual Studio Community 2022

Many people think we cannot write c code in the visual studio community. but this is completely not true, yes we can create a C file and run C code in Visual Studio 2022 let us see how we can achieve it.






1) Open Visual Studio 2022 

First of all, we are going to open Visual Studio 2022.


2) creating a new project 

Then we are going to create a new project by clicking create new project button.



3) choosing a project template:

Create a new project window that will appear in front of you. From this window select an empty project template with C++ symbol on it. Then push the next button.







4) configure your project 

A new window will appear in front of you with the heading Configure your new project. In this window, you can select your project and solution name. And also the location of your project. then click the Create button.






5) New project created:

On clicking the create button a C++ project is going to be created in front of you. At this point go to view the top menu bar options and click on Solution Explorer.




6) Open solution explorer:

On opening the solution explorer right right-click on the source files folder, go to the add menu, and with the Add menu select New item.






7) Add new item window:

on clicking new item, add new item window will appear in front of you. From this window select visual c++ on the left panel then select c++ file(.cpp) and name the file according to your choice but remember the most important point,  




change the file name extension from source.cpp to source.c to create a c file.






Click the Add button.





On this file with source.c extension you can write a C program. Write the given code it will print Hello World on the console screen.



8) Congratulations you have achieved the goal.

Below is a description video to create a C++ project and print the Hello World program in C programming format.


Comments

Popular posts from this blog

While Loop in C++ Programming Language

if and if else statement in C++ programming language