 Welcome to the course on computer programming. In this session, we will see how to write a basic C++ program and a simple CPP program using code blocks ID on Ubuntu. So let us begin by writing a basic C++ program to add two numbers. So first, we will click on dash home, write code blocks over here and click on code blocks ID. Code blocks ID will appear in a few seconds which has just appeared. We will create a project, file, new, click project. In this window, you have to select console application and click on go. C++ is already selected, so you just have to select the next. Over here, we have to first provide the project title, the folder in which your project will reside. So let us start by writing add two numbers. We are comfortable by having the C++ program in this directory. If you notice that the project file name which was blank earlier is now written as add two numbers .cbp, cbp extension is nothing but code blocks project. Click next. Over here, this is a GNU compiler which is a normal compiler that we use to compile our C C++ programs. Create debug configuration is important when we want to debug our programs. This will be seen later in the course. Click finish. This is the workspace window. Over here, add two numbers project has been created. Double click on sources. The main .cpp file is created. You can double click on that which displays the default program given by the code blocks. Now you can start writing your program over here. So we will first define two variables int num1 and num2. We will display to the user, enter two integer numbers .ndl is nothing but the next line character. We will take input from the user using .cn and now over here using the .cout statement we will add the two numbers. So addition of two numbers is we will compute the addition over here which will be printed and return 0. We will now save this program. To build and compile this program, we can either click on this command button which is called build and run. You can also click on build, build and run. What we expect is a terminal which is given here, enter two integer numbers which was written over here. We will enter two numbers for example, 45 and 34. The output which was displayed over here, addition of two numbers is displayed and the computation of num1 and num2 is displayed as 79. This is how you actually write a basic C++ program. Press enter to exit the terminal. Now we will see how to write a basic simple CPP program. Same way we can have the project over here. We will create another project. Let us say file new project. Click on console application as usual. Select go command button, C++ is selected by default. Click the next button. Now project title over here for example, we want to draw some three polygons. So we will write draw polygons as our project title. Similarly, we will have it in our directory called C++ programs. Our project file name is draw polygons.cbp which is a code blocks project. We will click on next. Over here, there is one small change. For normal C++ programs, we select GNUCC compiler. Over here, we have to change it to simple CPP compiler. Please note that for this session, simple CPP is presumed to be integrated with code blocks ID. We click on finish. As you see the draw polygons project got created over here. We still have the add two numbers project over here. So double click on sources as usual main dot CPP file. We will see the default program given by code blocks ID. We already have a simple CPP program created with us. We will copy this and paste it over here. Simple CPP main program, init canvas turtle which draws three polygons. You will save this main dot CPP file. Now we will build and run our program. If you see the simple CPP canvas all has already generated the three polygons. The window closed after 5 seconds, we can increase it to 20 and we can run it so that the simple CPP canvas terminal remains with us for a longer time. This is how we create simple CPP programs and a basic C++ programs. This was one way of writing a program. Another way is to create a source code file and not the project. Please note that simple CPP program should not be created using this way. For simple CPP as usual you need to create a project itself. So let us close both the projects as it will interfere with our new program. We will close the add two program project and the drop polygons project. Now we will create a file, file new file. Create cc++ source code and click on go. C++ is already selected, click next. Enter the file name. Say for example we will create just a hello world program, hello world dot CPP. Do not forget the dot CPP extension. We will now browse in which directory we need to create a project. So we will go to desktop, we will c++ programs. Hello world dot CPP and save. The entire path is displayed over here and we will say finish. A new file has been created called hello world dot CPP. We will write here cout hello world semicolon. We will save it and we will build and run it. Hello world has been displayed. We will increase the font size by pressing control, right click and we will select huge. Hello world is displayed. This is how we can create a c++ program without creating a project. Now let us examine the folder in which we have created our project. If you recollect we had created our project on desktop c++ programs directory. So let us close code blocks. This is our desktop. We will go to c++ underscore programs directory. Over here we have seen add two numbers, drop oligons and hello world program that we have created. Let us go to the directory add two numbers. You can see code blocks ID has created so many files. This dot CPP file is nothing but the code blocks project. That depend file contains all the dependencies of a project.layout file contains the settings of the workspace of a project which files were opened, where they were positioned etc. Main dot CPP is our source code which we wrote. Now there are two folders bin and object. In bin there is executable call add two numbers. The object folder contains the object file. Object file is nothing but the file that contains translatable machine code. So in this session we have seen how to create basic programs, simple CPP programs by creating a project and by creating just a source code file and also examining what files the code blocks generates. Thank you.