 So, today we are going to look at one example in handling character strings stored as single dimensional arrays. Yesterday in the extra lecture I had discussed a few things, within a couple of days we will put that also as a video lecture on your home page, although I did not use any slides, so I am afraid you will have to look at the web page video itself. I will take one example, primarily an example of separating out first and last name, if both are entered with some blanks in between and they are read as a single string. So, they should sort of give you an indication of how blanks are handled in character strings, they shall also discuss the course projects and as usual I will have brief announcements at the end. So, the problem is that if I have been given two names on a line, how do I read that line in? As I said you cannot use the C in function because the C in operator in C plus plus actually eats away all blanks, white spaces, etcetera and automatically extracts useful information on the line that you type. It could be the name, it could be a value, it could be a floating point number whatever it is and it appropriately assigns it to whatever variable or array you are reading it in. That is not useful if you have to handle a complete line as a single record as you are required to do in the assignment for lab 7. So, as an example we will take a record to consist of two strings, one is the first name of a person, second is the second name of the person separated by a few blanks. We will see how exactly we can take these out and print them. So, here we are defining the usual includes, notice that apart from the inclusion of string there is another hash include called C string. This C string represents all those library functions which are traditionally part of the C programming line. The original inclusion used to be hash include string dot H, but when you go to C plus plus compiler, C plus plus compiler also recognizes it by the name C string. So, I will include all of these things in our program, these are the main declarations in our program. So, let us understand what we are going to use different variables and arrays for. The first line says CAD line 256. This I expect naturally to read an entire line from the keyboard or any file inside my machine. Now, usually the line that you see on your screen is about 80 characters long. Names would usually be 20, 30, 40, 50, 60 characters long including first name and last name. However, remember that whenever you are trying to read a record as a complete line, there is no point in being stingy in allocating small memory to it. So, therefore 256 is a good value to allocate to a record which you want to read as a line. The line may contain numbers, commas, full stops, character strings, values, whatever one. An interesting declaration is star char ptr. This is a character pointer. When I declare it, it doesn't point to anything, but it creates a placeholder in memory. The value inside this char ptr will not be a normal numeric value as we have seen last time. The value inside will be pointing to an address in memory location. Typically, char ptrs are used to point to positions inside character string arrays. You can access an element inside an array by a numerical position, 1, 2, 3, 4, 5, which is the array index. You can also access it by a character pointer. We shall see the difference. Immediately thereafter, you see char name string as 60. So, you presume that the name that you will get in two parts totally will not exceed 60 characters, a reasonable assumption. Then you have two additional character strings declared, first name and last name. Please notice that when I declare them as 60, the actual positions will be 0 to 59 and the 59th position will be expected to be occupied by a slash null or zero value character, which indicates the end of string in any character string array in C++. So that means your effective length of the name is only 59 and not 60. I have declared two more arrays, first name and last name because the problem says I expect first name and last name as two different parts on the line and I have to separate these out. Obviously, the first name and last name individually will be smaller than the full name, but I do not know that. So, I assume that in the worst case, either first name or last name could be larger than whatever I may assume, I might therefore put the same size as name string. Then I declare a string type called line string. Notice that this line string is different from line to 56 car array, although it is what I am expecting to read when I use the gate line function on C in. This line string length is not determined by me, C++ is intelligent enough to read all the material that you, characters that you type till the new line character. When you hit the new line character, that is considered, that is when you press return on your machine while giving input, that is considered the end of the line. So whatever characters you have typed, C++ is capable of accumulating all of them in a string variable called line string. This is not to be confused with the C type character arrays. So, we will need some conversion to get that line which has been read into line string into our line, which is the car line to 56. I have additional things in N car. This N car I am going to use to indicate the number of characters in my string that I get. I do not know how many because I may not get exactly 60, although that is the limit I have. It may be less, it may be more. I also have an integer value called blank pass, which indicates the blank position because I need to separate out things depending upon the blanks. I have two additional variables, length F and length L. I use them to denote the length of the first name and length of the last name. I have usual indexing variable I. So is the declaration clear in the purpose? Ordinarily in a regular program, I would have written adequate commands to explain what these variables and arrays are meant for. I now give an instruction type a name and then I say get line C in comma line string. This is a function available in the string library of C++. The first name is name of a file. C in is the standard input file. But if I had declared any other name, I could have used that to read data from. So when I say C in line string, I would actually get the entire line that I would type on my keyboard into a variable called line string. I do not know how big is that string. So I have another function. Actually it's an operator because line string is an object, not really a variable or an array, that object dot length is the way I invoke the function within the object class line string. And when I say line string dot length, no parameter required, this will actually calculate the exact length of what is there in the line string, the value, the number of characters that I have collected, and that will be assigned to N care. So N care will represent the total number of characters inside the not counting the backslash null or whatever it is, it's just the total number of characters inside this. So these two simple functions help me to get a line, and this function helps me to get the length of the line, meaningful line. Now you notice that I want to deal with character arrays, that is an array in which I will handle the character string. That string I had defined, if you look back, I had defined this as name string 60. So what I do is I want to start getting the characters in the name string. I set name string N care equal to 0. Can you guess what does this mean? I am actually putting a backslash 0 or a null character into the last position in my string, where I already know the length of the string from the previous function, which is N care. So in the N careth position, suppose N care is 40, what it means actually is that the length of the string is 40. So 40th position will contain backslash 0, 0 to 39 positions will contain the actual characters. Of course I expect the N care to be less than 59 really in number, whatever. The comments indicate that now I am looking at reading the line string in the character array. Now for that, there is another function called mem copy or memory copy. My string exists in memory, my name string array also exists in memory. The string library provides a function called memcpy, wherein I list the name string, that is the string into which I want to copy, line string from which I want to copy. Now since line string is an object, you don't use a normal function on line string, but there is an operator called C undercore string. What does this operator do to line string? It takes the contents of the line string and extracts all the characters from that line string, converts them into C type array and puts them into the name string, which is an array pointed out by the name string. N care is the number of characters. Observe that instead of calculating the length of the string separately, I could have actually used here that entire object dot function to calculate the length, that is also all. So what do I have now at the end of this mem copy? I have inside the single array name str, the entire line that you have stored as a C character string. Hopefully it has a first name followed by a blank followed by the last name. I am now writing a program to locate the first name. Care PTR equal to care star, mem care, name string comma blank comma n care. What does it do? What do we expect it to do? It will actually locate the first blank inside name string. We give the length up to which it has to search. So this is actually a search function, mem chr is a search function. There is a corresponding search function which will operate upon the C type array of the C library as well. Notice that last time I had given you a whole lot of function names. So if you look at any standard information on C or C++ libraries which is there on internet just search for C++ string for example. You will get the names of all these functions and what they perform. However, here I am using this function but notice that I will not get a position of the space. I will get instead a care pointer. There is a fundamental difference between a position and a care pointer. Both point to the same location but they point in different ways. A numerical position would be another index 13, 14, 15, 21. A care pointer will also be an index but it will indicate a position through a pointer variable. So suppose I had written, I had executed this program, hopefully I will have something like type the name in two parts on a line. This is not the syntax that I have used in the program. Some prints are different message but some such message. And suppose I give this line first, one blank, last. You would have understood by now that the first blank last would now go into an array like this. F, I, R, S, T, one blank, L, A, S, T and back, black slash zero. There could be some elements in the array because the array is larger. It has 60 elements but we don't care what the remaining elements of the array contain because they don't matter. The point that I was making is that if I have an integer variable, say I, then I will use the value of I as zero, one, two, three, etc. These will be integer position. What I am calculating using that function is not a numerical value. So I am getting a star pointer. The PTR may have absolutely any value as we have seen, some hexadecimal value. But the PTR means that the PTR will point either here or here, etc. In our case, the function will return a pointer to the first blank. That means our pointer, which is I think care PTR, this will point to this position. Now I want to get the position of this. How will I get the position of this? I have a pointer here but I also have a pointer to this element because this is an array. The array name itself is the first position. The array name, too, will be a pointer because the array name itself is the pointer. As I mentioned to you, when we pass array names to functions, values are not passed. The pointer to the first element is passed. Consequently, the array name in C++ itself is a pointer to the first element. What was the array name that we had used? We had used name string. So name string can be used in two ways. I can use anything like this. This will mean Ith element of name string. However, if I just use name string, it is a pointer to the first location. Now, using these two pointers, I can actually find out a numerical position of the blank. Simple. I subtract this value from this and add one to it. I should get the point. I should get the numerical value. So this is what I have tried to do here. So I locate the first space using char ptr equal to char star, mem char, name string, blank and char. This char star is called casting. The value calculated may be an integer, may be something else. If you want to convert that value appropriately from an integer to a character pointer or you care pointer to a character pointer, whichever way you can actually cast the result. This can be applied for any expression. So suppose you write a floating point expression and you want to convert a value to integer. You can, before assigning to integer value, in front of that expression, if you put inside the bracket int, then the whole value will be converted to int. It is called casting a value in a different type. It is a fairly powerful facility. We use this to convert whatever value is returned by this function into a character pointer and assign it to char ptr. Now notice the next one. If char ptr is not null, why am I checking for that? I may not have any blank in the whole string. Somebody has goofed up in giving, instead of giving me two names separated by a blank, fellow gives only one name, no blank and carriage return. Now that means there will be no space. So my function will return more, it will return a null. That is the essence of the memcaya. Either it finds a position, in which case it gives a pointer, otherwise the pointer is null. A null pointer is given. Notice that null pointer is different from a null value within another element. In fact, in cc++ a null pointer like this is considered the most troublesome person in the world. The creator of this null pointer has recently confirmed that during our winner, he said that I should have avoided null pointers. So this is a very dangerous thing. Every time you use pointers, you better be sure that your pointer is not null before you use the pointer to access anything or to use it in any computation. So we make sure that the character is not null. That means I have found one blank. If I have found one blank, I have to get the first name. The first name as we saw is between the beginning and the first blank. That is supposed to be the first name. So I will just find out the position of the blank as equal to care pointer minus name string plus one. So pointer to blank, pointer to first position, difference plus one. That is the position of the blank in integer num. So blank pause will now get this. I will print out from blank at blank pause and I will set the length of the first name as blank pause. So let's just very briefly look at the array once again in the example. This is actually the whole string. I have F, I, R, S, T. Assume that this is the name. This position will be fourth position and this position will be fifth position. So this is pointing here. This is pointing here and the pointer difference plus one gives me the total number of characters. So this is the blank position. The blank position I will get as five. When I get blank position as five, that is also the length of the string because the first name will have one, two, three, four, five characters. Of course, this is the sixth position in the array. So in the sixth position, I will have to put a backslash zero. So length of F, I set it as blank pause. The value of blank pause will be six. The element was fifth because we started counting from zero. I will copy n characters from a string. This is another function called strncopy. There are two functions strcpy which copies an entire string and strncpy which copies n characters are specified by you. I am copying from name string which is the original string that I got into a string called first name. That is my array which will hold the first name and how many characters I want to copy? Length F. So length F characters will be copied. I want to make sure that the first name array contains a proper C++ string in an array. So I will put at the length F position a zero which is a backslash zero. So the whole string is guaranteed now to become a null terminated string. So just to recapitulate, I first copy the given input string into a character array. Then I locate the first space by using memcar which is a search function. After locating that, I confirm that the pointer return is not null. If it is not null, I have found one blank and I can get the first name by just finding out its position and copying that part of the string into first name. Now I proceed to look at the second part of the name. I have assumed so far that first name and second name is separated by only one blank. But what if somebody gives two blanks or three blanks? Then obviously I have to gloss over those blanks. I should not count them. I first output the first name for I equal to zero I less than length F, I plus plus C out less less first name I. Observe that this will put one character at a time and all the characters in this array will be put out after which I put an end L. C out end L is not part of the four statement. The four statement scope starts here and ends here. This is because I am using it on a slide so I am shortening the length. Otherwise I would have written it in proper form. So after outputting all the characters in the string I will just output an end of line. Now I know the position where the first blank was found but I do not know whether there are subsequent blanks also. If there are I must give them. That is why I have written a small part of code which keeps consecutive blanks if any. What it does? It looks at the blank plus position of name string itself. If it is equal to blank it simply increments blank plus plus plus. So this is the while loop. If I find a blank I increment blank plus. Observe that blank plus has no purpose in my life anymore. It has found out the first blank position. So I can continuously update blank plus to move towards next position, next position, next position till I find a non-blank character. So while the character is blank I increment the blank plus. However I must check whether there are only blanks till the end and nothing more. Somebody has cheated me, given only one part, left a lot of blanks and then pressed end of return, end of line. So if I hit the end of line itself then I must say there is no other name. That is what I do here. If blank plus is equal to n care that means I have completed the entire length of the string and I have still not located anything then I will say see out no last name, end of. However I break out of the complete program because there is no point in continuing my program any further. I simply say return one. So I print a message that there is only first name, there is nothing else and I get out. But if this is not true, if indeed somebody has given a valid second name then this while loop will end here and when the while loop ends I would have skipped all consecutive blanks. Consequently when I come out my blank pass would have hit the position which is a non-blank character. So I now print the last name. What is the length of the second name? The length last name is n care minus blank pass. Observe that n care was the total length of the character string and blank pass now points to the first non-blank character in the second part because of the skipping of the blanks that I have done. So this way give me the length of last name. Now I again use string n copy last name name string plus blank pass and length n. Notice that strm copy copies from one string to another as many characters as you prescribed. If I just said copy from name string to last name it will start copying from the first position in name string. That is nonsense. The first position in name string contains the first name. I wanted to believe that the string that I am giving for copying actually does not start from the first position but starts somewhere else. And where should it start from? Where my non-blank character is and that is why I treat this as a pointer name string plus blank pass that is the first non-blank character position. So this becomes a pointer which will point to the middle of the string where the second name begins. And how many characters I am copying? Length l. This will get me everything into last name array to make sure the length lth element of last name is set to 0 which is backslash 0. So consequently in second name that is last name also I have a valid name. I will print it out by some message first and then again for i equal to 0 length l, i plus plus, c out, last name i. I am not bothered to put opening brass and closing brass because a single statement after for loop automatically starts and begins ends the scope of the for iteration. So consequently the next length c out endl is actually end of line that means I will just print end of line. If this is not so, else c out name has only one word. Observe that this else does not correspond to any if here. We will have to go back one slide. Let's go back here. Notice we had said here if blank pass equal equals n care we had said no last name. If I have not found any non blank character after the first name then I will say the name has only one word endl. Here are some execution results. I type a name here. Let's say my friend Nannlal one blank soundl. The program will output found blank at 8. So notice 1, 2, 3, 4, 5, 6, 7, 8. 8th position is blank. First name is Nannlal. Second last name is Sardar. The program works correctly. As I told you however in real life you cannot make assumptions about data being correct. People may type in data wrongly and the mistakes could be of any kind. That is where you need to validate the data. What my program does is it does some very simple almost trivial validations. In real life you will have to do many validations. For example suppose instead of typing Nannlal I type N A N D comma semicolon l. Now can that be the name of a person? Generally it is not tradition to name people with commas and semicolons. So I should be able to look at that name string and say sorry this doesn't look to me to be the right name. But maybe somebody in Timbuktu have names like that. So I leave that to human beings to decide whether I got a right name or wrong name. But I must print a message and a warning saying it does not look like a right name. In your projects you will be spending a lot of your programming skills in validating data and giving messages for wrong data. Even in this simple program let us see some examples. Here is the next example. I have typed my name with lots of blanks in between. As you observed in the program I have taken care of skipping the blanks. So that is why when the program is executed it says found blank at 7. Notice 7 is this position. But they blank at 8, 9, 10, whatever. However the program correctly prints first name is deeper, second name is further. So the program is sturdy enough to withstand multiple blanks between two different parts. Let us again execute it with some other data. I type one name, Sridhar. The program correctly says name has only one word. Don't cheat me. However, look at what happens when I type Kavi Arya with lots of blanks ahead of Kavi then Kavi, then lots of blanks, then Arya. Now what will my program do? It locates the first blank. Unfortunately not between these two words but here itself. Found blank at 1. What it means? It assumes that first name is null. Because the string starts at 0. Blank is found at 1. So the last character is also at 0. It actually prints first name as nothing. Now as per my program the blanks will be skipped till it finds a non-blank character. It finds capital K. It says I found this surname. And from that point till end of the string it will print that as the last name. So my friend Kavi suddenly has lost his first name and Kavi Arya has become his second name. That is unfair. This is just to illustrate that you have to be very very careful when you deal with real life data. In fact the second assignment example is precisely to convey to you that when data is entered by different people there could be lots of mistakes. And you have to provide for those mistakes. And you have to either give warnings or make suitable assumptions and even make corrections. When you correct wrong data like that it is called data cleansing. You cleanse the data. For example here you should be able to figure out logically that if such is the case the leading blank should be removed. If you remove all leading blanks then you will print Kavi Arya's name and recognize Kavi Arya's name correctly. I'll leave it to you to think about this when you complete the second assignment. When we print data we have been using C out statement. The C out statement is not always very good because it does not align the printing properly. I would like printing to look neat, look pretty. So process Sony had some examples I thought I will include them here. Look at the normal C out. Suppose I am outputting a 2 by 2 matrix and the matrix elements are 1, 2, 3, 45, 6, 7 here. The first two elements are 1 digit numbers and the second row has 3 digit numbers. Now if I just execute this program just C out A, I, J and at the end I put NL after the J loop so that the first row is printed in first line and second row is printed in second line. What the output will look like is one blank 2, 3, 4, 5, blank 6, 7 here. Now it is not very clear if I have large output like this then all my positions in the array which I would like to visibly see would get all disturbed. You will recall when I had shown you the histogram and the image pixel values they were adjusted so that you could make sense that this is first pixel, this is second pixel, this is the eighth pixel and so on. You would like therefore the printing that you do to appear appropriate or pretty. For that purpose there is another command which is not C out but a command which is called printf. This is a function. This is a C style function. So instead of saying C out if you say printf followed by prescription inside the brackets for how the value should be printed and what value should be printed. So this is a replacement of C out. I thought I will very briefly describe what does this function do. So I would like ideally the printout to be 1 so blank blank 1, blank blank blank 2 etc. I would like the output to be like this. How would I get an output like this? This is done by using the printf function. The printf function has what we call format specifiers. A format specifier is a string which declares how a particular output should look like. Unfortunately the syntax of the format specifier is very funny. It always starts with a percent symbol. If I say percent 6D this is a specifier to say that some integer values to be printed print it as a 6 digit integer. Observe that if I say this the integer value will be printed right justified in the 6 places. It will not appear arbitrary. Percent as means print a string. I am not specifying the length so string will be printed as is. But if I say percent 7 as that means string is to be fitted in 7 character space. If the string is smaller it should be paired with grand it should be truncated. Percent 8.2f this is a specification for floating point printing. That means the value that is to be printed is float. Total 8 digit space is to be occupied out of which 2 digits should be after decimal point. 8.2g is a similar specification but it says that if you cannot accommodate the value in this field because either the precision is larger or the number is very small or big. For example if you have a number which is say 2.7 into 10 to power minus 90 now when printed as decimal it will be 0.000000 so many zeros and then 27. Now in this 8.2 format I will only get zeros. So 8.2g says that the same floating point number but switch to E notation if required. Here are some examples. They are simple examples but I would request you to try out many such examples by giving arbitrary value giving format strings and then trying to see what you get as the output. So here I have three variables A, B and C which are integer and three variables P, Q and R which are floating point. First let us look at the integer variable. I have assigned a value A equal to minus 1 B equal to 10, C equal to 100. Let us look at the printing that happens. Print F percent 5d backslash N A. Notice that what is given as format specifier is a string. You can give multiple format specifications and give multiple values to be printed. You can look at any example and see that in a book. What this does is it prints the value of A in a 5 character space. So observe that minus 1 will be printed like this. There are 5 spaces. Assume that the starting of the printer line is here. So this will be put in the last two positions. When you print B it will print 10 like this. When you print C it will print 100 like this. Can you see it will be a very useful thing to align numerical values appropriately? Consider print F percent 2. If you say percent 2d then minus 1 will be printed in two spaces. B which is 10 can also be accommodated in two places. C however is 100. Not just because you have asked it to print only in two spaces it will not print 00 or 10. A programming language cobalt does that actually. Depending upon the picture of the print out data value it will print only so many digits. So we have had problems when 10,000 became 0000. Here however C++ will print 100 properly. Here are examples of floating point numbers. I have values for P, Q and R as 123.456, 0.1234, etc. and they are printed like this. You should now try to adopt print F wherever you can particularly for the final results which you are going to print out. I am suggesting this you can do it for your practice program that you use but most certainly all project outputs must look neat not haphazardly. There is a lot of work to be done to decide on the proper messages to decide on the proper error messages to decide on the proper output messages and that work is integral part of any good program. Just because the logic of the program is right the program does not become a good program. It is a working program. It becomes a good program when it is properly documented within and when it produces output which is well documented. I will very briefly re-describe the projects that we had. I had a meeting with the team leaders. Unfortunately all team leaders were not present. Unfortunately all teams have not yet been formed. I have advised all the present team leaders and that will be in fact part of the assignment this week in the lab. You have to complete formation of team by midnight tomorrow. There will be five teams of four students each who will form a lab batch. In each lab batch there must be five teams. There are lab batches which have only 17 students. Then form teams of three students each with few teams of four students. Four students is a norm. It can be violated only if you have more than 20 students. If you have more than 20 students it is not permitted to have a batch, one batch of three students and few batches of five students. The minimum size of the batch is four. One batch can be either three or five in the extreme cases. Please also remember to balance out the batches. I have found and that is natural that either a few friends or few people who have a lot of programming experience they team up together to form a team. Very good. That will be a very strong team. But remember the project evaluation which has 25 marks has 15 marks for the project. If the entire project is not done well because just one team is very weak the whole project report may get only five marks out of 25 and every member of the strongest team will also get five marks. Every member of the weakest team will also get five marks. This is the first lesson in any group work. Balance out the assignment of work. So please ensure that there is no weak team in the lab batch. If there is, if you find any, some of the experienced people who have done some programming should take the lead to shift over to some other team. It is not necessary that every team must do excellent programming work. Every team must write some programs but there is a lot of work which I shall explain tomorrow when I describe the projects in greater details. The whole group that is lab 1A, 1B, 1C, 1D or 5A, 5C, 5D, 5A, 5B, 5C, 5D all of that will be doing just one project. It is called the mini national UID project for IID campus. So you will be allocating a unique ID to every student on the campus and you will be using that unique ID with fingerprints for recording attendance or for permitting, whatever. These are the four parts. These are the four sub-projects. Registration, classification and consolidation, duplicate detection and usage. For usage, you will have to build an application. I shall describe these more details tomorrow but please understand that one batch, say batch A could be doing duplicate detection, batch B could be doing registration, batch C could be doing this, batch D could be doing this. How do you decide that? I would expect the team, the lab batch coordinators, four coordinators to sit together and decide what they would like to do. I could specify it easily. Incidentally, if the team formation is not done completely for any lab batch by tomorrow midnight, I shall use my authority as instructor in charge to reallocate teams for such batches and I might do that very arbitrarily. So by Wednesday morning, either you decide properly balance five teams in every batch or I decide arbitrarily. That's the only choice. The purpose of these projects. Now this is extremely important for all of you to appreciate this. So far you have been doing individual assignments in labs or answering questions in quizzes or lab tests or mid-semester tests as individuals. Programming is not an individual activity. Programming is a group activity. So therefore the objective of the project is to expose you to and give you some practice in large software development. As I mentioned earlier, large software development requires version control. We shall use a system called CVS for version control. Any significant program development and checking and testing requires some online program debugging tool by which you can see where your pointers are moving or where data values are moving. We shall be using a graphical debugging tool called DDD. You will have to learn how to test programs, how to write test input and how to first write in advance what should be the correct output and test your programs accordingly. Enormous amount of documentation. All of this would have standards which shall be put on the web page for the projects and you can follow them. You should also be exposed to the notion of teamwork. The teamwork starts with forming good teams in the group. Professional peer evaluation. As I mentioned earlier, I have used this technique in my postgraduate courses. This is the first time I am using it for a first year course. Out of 25 marks, 15 marks will be given for the project report by the TAS based on the project report evaluation. But 10 marks which are for individuals will be given by the lab batch based on the peer evaluation. I shall explain the process of peer evaluation. By and large, whatever marks you submit out of 10 will be allocated as your earned 10 marks. However, as I mentioned to the team leaders, if I suspect that the peer evaluation does not accurately reflect the work done, it is not necessarily programming work. It is all kind of work that is required for that project. If the work done is not commensurate with the marks, I reserve the right to conduct two sample vivaas. I will take any two sample people from the whole batch and I will conduct a viva. Now, suppose you have given 8 marks and 10 marks to those two students and I detect that they deserve, say 9 marks and 10 marks, then my average mark is half mark more than what you have given. I will add that half mark to every student of the whole lab batch. On the other hand, if I detect that these two students actually deserve 4 marks each and not 8 and 10, then you have given 4 and 6 marks more to these two students, the average works out to be 5 extra marks. I will deduct 5 marks from every student of that lab batch. So please understand that it is extremely responsible activity. That is the principle of forwarding peer revolution. Well, you can mull over it later. May I have your attention please? I know it is harsh, but that is how it is. You cannot get only the authority to give marks to yourselves without being accountable. I would like two minutes of your time. There is something that has been pending. I still not have got the final updated mark list for the mid-semester from my TES. It is quite likely therefore that this list might be changed. Once I get the final list, I will put it on the home webpage, but however, it is with honour that I would like to recognize these people. Guru Raj Suresh, what is he here? Yes, thank you. Nami Traval. Can't even see. Yes, Nami Traval is sitting here. Well done. Vinayak Gagrami, we saw him yesterday, returned and sent a nice program. Ankush Jain, Ankush is here. Yes. Siddhas Chauber. Where is Siddhas? Yeah, that side. Okay. Udi Jalan, Prathik Bandari, Jarin Jali. Long corner. Okay. Jai Khan is there. Raja Jain. Shiva Chandramawali. Missing? Chandramawali is not here. Okay. And Nalamala Gautam Reddy is there. There are at least three other names that I know who are special because they use binary search in a problem when it was not required to be used. Unfortunately, there may be many others. I do not know who had used binary search. I would request those few of you who actually use binary search in solving that problem. You remember the problem did not require you to use binary search but it stipulated that one of the arrays was sorted and naturally you should have used binary search. Although it was more difficult to code online in an exam but those few who did, they deserve the honor to be recognized and I would like their names to be known, which I will flash next time. Last request again. Please give your anonymous feedback on the course on this side. It has been put up on the web. Please ensure because your feedback is very important for me and my TAs to correct any problems that we have with the course delivery so that you can benefit from it. And repeating this concession, there have been umpteen people. I have received some confession letters already but there are many people who are inquiring that I had copied a program which has not yet been graded. I am going to resubmit it anyway. So do I have to give an apology letter? Please understand that the apology letter requested is not connected with any evaluation. It is connected with falling prey to a wrong temptation and therefore the punishment is for falling prey to that wrong temptation. It does not matter whether it had zero marks associated with that assignment. But if you have copied an assignment without giving credit from whom you are copying then you have done a wrong thing for which you must confess. So this I must have. There is absolutely, absolutely no debar from this. As I have said and I have repeated again there will be no punishment except that in those assignments they will get zero marks provided after the confession letter they also resubmit those assignments doing properly things on their own. Doesn't matter whether they are right or wrong. We are conducting, we have conducted seven assignments. I am extending the date of assignment submission including any old assignment that you have submitted which we are not correct. You have a chance to correct them and resubmit. I am telling my TA's to reevaluate assignments only those which are latest submission. If I submitted something earlier and that is right, leave it. But if you have some problem with that and you now have thought a better thing you resubmit that assignment by rewriting it that is perfectly fine. The last date for such submission is next Saturday. So you can submit all assignments including the last lap seven assignment and we will count best five out of seven. Ordinarily I expect everyone to get five marks out of seven at least four, maybe three. Those who have unfortunately copied somebody else's assignment may stand to lose at most one mark. It is not worth it. Please send your letters immediately because one thing I have guaranteed on 13th February which is the last date by which time I expect to complete my comparison thing if I do not get these confession letters and catch people who are copied they will be given fail grade on 14th that is guaranteed. Please don't get into that problem yourself and please don't force me to get into an extremely bad situation. I feel very hurt if I have to do that. There are some people who have made me saying that we have written this but we know some people have copied from our assignment. Such people need not worry. If they tell me in advance that they know some people have copied if their names comes up in the matching I will ignore those. If their names don't come up in the matching if their names come up in the matching and they have not informed me they may be called for a discussion. To me, I have a speciality in spotting the original authors. No person who is innocent of copying will ever get any punishment. That I guarantee. However, others who have fallen to the temptation must confess and must not do this. It is bad actually. It is bad for you. You don't learn anything at all by copying and testing or by changing some variable names or by shuffling some code. You learn a lot by attempting a difficult problem not necessarily getting the right solution. I want you to learn that. Thank you very much.