 Welcome to the course on computer programming and to the session on code blocks. In this session, we will see how to customize the default code provided by code blocks while creating a file, the different coding styles and finally, the auto complete feature. So, let us begin by modifying the default code. We will click on settings, editor. In the left pane, we will scroll down to default code. As you can see, this is a blank window in which we need to type the default code. Say for example, let us type hash include iostream using namespace std int main return 0. And let us say normally, our programs will have atleast two variables of integer, int num1, num2 and a variable called counter. Let us click on ok. Now, we will click file, new file, click c++ source, go next c++, next we will create a file in a c++ programs directory. We will write here say for example, prime dot cpp, we will click save and we will click finish. As you can see, the default code has appeared over here. We will now move ahead to discuss the different coding styles and the format. Let us imagine that a programmer has written a large code without any formatting. We are now supposed to read it, understand it and then modify it to improve its features. A difficult task indeed to format a code. Consider an example like this. I do not understand anything. Well, let me see yes, there is a function called fill matrix which is also called over here. I do not know where my main function is. Let me search using control f main, we will click find, oh here is my main function. Well, if I need to study this as a programmer, my first task would be to format it. Formatting this code manually would be very time consuming and very tedious. Well, let us not worry about it as code blocks has provided us with a plugin for formatting any kind of code written by a programmer. Let us see it. We will click anywhere in the editor and we will click plugins, source code formatter. Let us click this, plugins and source code formatter. Wow, the code has been formatted as the way we wanted. Now, let us go through the code. There is a function called fill matrix excluding row call which has some parameters. There is a for loop over here which in there is some condition if it is satisfied then the row is incremented, if not then the column is incremented, there is a temporary array and there is a return. There is another function called bool determinant which has three parameters. If I scroll down, yes, I can now see my main function. I could not even identify in the previous example which we saw. So, the determinant is called and finally, the see-out determinant value is printed. So, this is how we format the code using this plugin. Let us now see the different coding styles. We will just save this program, control S, we will go to settings, editor, scroll down in the left pane to source formatter. If you can see, there are different styles, Alman, ANSI, KNR that is Carnegie and Richie, Strauss-Strauss-Strauss, White Smith, Gnu, Hotsman and many more. Let us click on KNR. Let us click on Strauss-Strauss-Strauss-White Smith. So, what is the difference between all of these? The source code or the coding style is nothing but the spaces that we have on indentation and where the curly brace is placed, opening curly brace and the closing curly brace. If you see in the GNU format, the GNU format, there are two spaces for indentation and the curly brace is placed on the next line of the statement. Now, let us click on K and R. Well, K and R has four spaces for indentation and the curly brace is placed on the same line as that of the command. Let us click on Hotsman. Hotsman is also similar to GNU and K and R, but with some changes like the if statement appears over here. By default, if you recollect a program which we just formatted, it was unsee style. As you can see, there is a function over here with four spaces indentation. The curly brace placed over here, four spaces indentation, the if and other things. Well, let us format it to Hotsman style. You are free to choose any coding style. Code blocks ID will format your code according to the style that you have selected. Since Hotsman is selected, we will click OK. Now, we want this program to be formatted as per the Hotsman style. We will click on plugins, source code format. If you see, the coding style has changed. Let us now cover the autocomplete feature. Code blocks ID provides some keywords which we need to write in the editor and press control J, control J on the keyboard. On doing this action, some part of code is generated in the editor. For example, let us write inside the main function IFEI and press control J. This code has been generated which is nothing but IIF ELSEIF ELSE, IFEI. So let us go into the details. We will click on settings, editor. We will go down to abbreviations. These are the keywords which code blocks offers and this is the code that is generated. So let us see IFEI. Yes, this code indeed appeared in our editor when we wrote IFEI and pressed control J. Let us modify say for, this is the default code. Let us write say for counter equal to 1, counter less than equal to 10, counter plus plus, curly brace is open, curly brace is closed and let us say for example, some cout statement. And we will click on ok. Now we will come here and we will write for, we will type the for command and press control J. If you notice the statement for counter equal to 1, counter less than equal to 10, counter plus plus with the cout statement and opening and curly braces which we had written has appeared over here. In this fashion we can create some templates and use it in our program whenever we require it. With this we conclude the session and hope that coding style and autocomplete features of code blocks will help you using this ID effectively. Thank you.