 As I told you in the beginning, I would like to actually share with you an experiment in take home tests that we have been doing and we have found it extremely useful. So, let me explain to you what that notion is and in the process, I will also give you a set of additional problems which we had used in one of such take home tests and their solutions, all of which has been uploaded in the Moodle. So, you can examine those things in details. I just wish to briefly explain the concept behind this. As I told you right at the beginning and as my friends, Professor Sridhar Iyer also have explained that learning has many facets. Classroom learning and lab learning is one thing, but assessment and learning through assessment, treating assessment as a learning tool is an exciting possibility. We try to implement it here through take home test. We will see a sample take home examination paper after examining what exactly we mean by a take home test and then we will just see one sample model answer and question, but later on as I said you can look at the details later. Now, first before explaining the concept in any more details, let me show you a sample announcement that you can make to your students. The basic concept is very simple. Instead of conducting an examination in a regular classroom where all 60 students come, there is a 2 hour exam. Let us say you set a paper, give it to them. They all write the answers. So, you spend your 2 hours in conducting the exam and then you spend 10 hours in evaluating those papers. Now, you have to do this if this evaluation is mandated by the university and you have to count it towards marks, but suppose you want to give the students an experience of learning through examination, then why should you have to waste so much of your time and why should students have to come merely to get that experience, although no marks are going to be added to his or her total grade. The take home sample test is a concept where we give a test. The students attempt the test at home. The students self evaluate their answers and the students discuss those answers with others. Thereby, they learn more. Two things are realized by this experiment. One, they actually get a realistic feel for an actual test or examination which will be conducted later. So, this is a trial experience for them. Second, they are not tense because their score or their answers are not going to count towards their mark. Third, they can do it at the leisure of their hostel room. Fourth, although we prescribe a time of 2 hours, they can spend 1 hour now, 1 hour later. Fifth, although we say 2 hour test, they can actually take 4 hours and write their answers because they are doing it for practice and for fun. Sixth, after they do it, they get to evaluate it themselves. Now, how do you evaluate? You have to look at the model answers. Please note that if I have actually given a test, I am sure I have made some mistake. I am more keen to read the model answers and compare what I have done and I would like to do it immediately, not 2 weeks later when you return a formal answer book led to me. Therefore, there is a greater chance that I will learn more by comparing my answers and the model answers that you have given. In another attraction, we suggest after doing this, please discuss with your friends why you think your answer is treated as wrong answer in the model answer case or maybe you have found an alternate way of doing things which is also correct and more importantly, when you discuss with 4 or 5 friends, then learning increases. Please note that these discussions and such things the students will do even when you actually conducted exam, but the difference is you conduct the exam today, then you will take your 5 days, 7 days, 10 days to correct those papers because you do not have time and by the time you return those papers, the only thing students are interested in is finding out how many marks they got, not the exact details of the mistakes and learning. Some students may be interested. This experiment we believe has permitted us to do all of these things. So, let me show you a sample announcement similar to what we make here. A take home test is published on the Moodle. Of course, we use Moodle. There would be colleagues who do not have a learning management system. So, you should also make it available in a printed form. The expected time to be spent is written here. It was 2 hours for the sample test that I have included in this session. Next instruction says, solve it on your own before such and such time. Why? Because at this point in time, I am going to publish the model answers and the marking scheme. So, obviously they should finish this off, otherwise there is no fun. They will already know the answer. There are some detailed instructions which are useful because they are handwritten answers. You would like to share, to be shared with other colleagues and you would like some commonality. Otherwise, people will come up with 20 different sizes of papers. So, here is a session that uses a set of A4 papers. Write roll number, name and lab batch on the top right corner. Note start time and time. When you finish and write the duration. Now, here is an interesting instruction. Discount any time when you are not attempting the paper. So, suppose I start at 12 o'clock. At 1 o'clock, I get hungry and there is lunchtime in the hostel. I go for lunch, come back at 2 and continue. I should be permitted to do that. I will not count that one hour in between. This is an interesting instruction. Two hours is an indicative time. Do not worry if you take longer in your attempt. But remember that regular examinations will have such type restrictions. So, simultaneously, I am telling the student two things. One, be relaxed. However, remember that you are doing this practice to later on appear for an exam where there will be a constraint of time. It is unbelievable how students very properly respond to such things. By the way, we ask students to do this self correction, consult other students and understand it better and then submit their answer books to us just for our perusal and recall. When students do that, we just look at the duration of the time spent and so on and we find some very interesting things. There are people who take longer time. There are people who have completed the paper earlier. People who have completed earlier might have got more marks or less marks, all kinds of things. And invariably, all students have responded almost without exception that they have enjoyed this exam, which means they have learned better. Anyway, the other specification generally is open book exam, but the attempt has to be your own. That means do not copy from anybody. It is not worth it. It is not required. Anyway, I am not going to count these marks for anything. This experiment is followed by a sample paper. The additional announcement says after you complete the paper, just keep it aside. Model answers will be put upon such and such date. Evaluate your paper. Count the total marks you score and write it below your name on the front sheet. Discuss your performance with your friends and with colleague members of your lab group. Why? Because the lab group is like a team. Three or four or five or six people are going to work on a project. And if they are going to work on a project together, it is better that all of them assimilate this knowledge amongst themselves very well and discuss with each other. I have found this to be an extremely useful thing. We ran it twice, once before the mid-sem and once before the end-sem. They also got a hint of what kind of, what type of questions may come in the actual exam. As I told you, I have included a document called sample examination paper and model answer. The document contains both the questions followed by answers. The sample paper was of course shorter, but this is the sample with model answer. The question one says the following program segment is executed with input formed by the last two digits of your roll number. If your roll number is 11d50038, input is 38. Write the exact output. This is a four mark question in a two hour test because we can imagine that one need not spend too much time in it. In fact, this is the simple type of question. Notice what the program does. It reads the value of r that you given. Then it is some fancy calculation. It divides r by 10. Then it adds modulo 10 to it and then it takes modulo 10 of the whole thing. That is the value n. If n is 0, n is reset to 10. We just check whether the student can quickly do these computations with his own, his or her own roll number whose last two digits were input. The first output that comes out of the program is value of n is so and so. Please remember the question is write the exact output. This is not the program. This is just the starting part, but one output is prescribed here and he writes the, he or she writes the n here. Next, for some value 0 of a, it runs an iteration for k equal to 1 to n. Adding to a, the value of k every time. k is also incremented. So, this is a iteration without anybody. The actual activity is happening inside the iteration control statement itself. You can very clearly see what is happening is that since k is being incremented, it varies from 1, 2, 3, 4, 5, 6, etcetera. Since I am adding that to a, I am clearly trying to find out the sum of n natural number. The output is a is this. Next, b is equal to 1. m is equal to 1. While m less than n by 2, b is equal to b star a. You can again find out what it does. I increment m and in this, I iterate around this and I output b. I have given some fancy calculations here to find out whether the student understands how these iterations, how these computations work. At every stage, I am creating an output a here and output b here. Similarly, there is an output c here with some other iteration. Now, notice what I have done. I have written a program which has four segments. You will recall my discussion earlier on auto grader where we said I should be able to give partial marks to a question even if a student has made a mistake in one place. In this particular case, the student might make a mistake. Let me go back. The student might make a mistake in correctly calculating the value of n. His roll number is something and the n that he finds is something else. However, in his answer, he is going to write what n he has found out. Now, with that value of n, I can examine the remaining answers and still give mark for the correct interpretation of this code. Here is a model answer to question mark. It says first find n by adding the last two digits of the roll number, then calculate modulo 10 remainder of that sum. If n is equal to 0, reset it to 10. That is all that small piece of code. Now, for 10 possible values of n, the values of a, b and c will be as under. So, here I have listed. If n is 1, a b c is this. If n is 2, a b c is this. If n is 4, a b c is this. Please note and let me revisit this program again. The calculation of n depends only on your roll number. The calculation of a depends only on n. The calculation of b again depends only on n. It does not depend on a. So, these are all independent segments. What it means is, if you look at this model answer, a student may make mistake in any one of them, but it will not affect his or her effort in the other segment. These kinds of questions are useful in discriminating student. The more meticulous people will never make a mistake in any of these. Somebody is smart enough to understand, might goof up in calculations and make mistake somewhere else. But I would be terribly worried if someone makes a mistake in all four of these. That means that student has not understood the basic concept of computations and simple iteration and is a fit case to personally meet and handle. In fact, this is the main reason why we collect all the papers from the student. It tells me two important information about two important groups. Students who desperately require some help because they have not understood the basic concept and students who have scored extremely good marks in this take home test. Why do I need to know them? I must know them because I must call them on a Sunday and tell them, you guys are very smart, but now try to solve these hard problems and encourage them to attend something much better than what they have so far ahead. So, you see it is a learning experience for the students. It is also a feedback to the teacher given by the students in an absolutely homely environment without any tension of the exam or something like that. My recommendation is please try to do such a thing and give me a feedback and get yourself a feedback on whether you find such an attempt useful to both students and to you or not. Please remember you still have to spend time in setting the paper and setting the model answer, but once you do that the rest of the work is distributed. Evaluation is done by individual students, discussion is done by individual students, all that you get is collect back all the mark and you are not interested in the mark, but you are instead interested in finding out groups of people out so that you can pay more attention to both the extreme, the very well performing students and very poorly performing students. Not waste your time, I have written this note to the workshop participant. Go through the sample exam paper and the model solutions which have been loaded on the workshop model. It is a full paper, there are nine questions. Go through these, you will notice that no marking scheme has been given and thus partial marks cannot be awarded by students. Please note, there are not experienced teachers who are evaluating the paper. These are students. In fact, even if you and your TAs would have a problem in evaluation, if you are not worked out the partial marking schemes or marking scheming here. Now in this case for question one it is simple, one mark for each correct output, but for question two, question three, question four, there are totally nine questions, I think nine or ten. Of course the answers to the last few questions are not given because one was an optional question. That means it was a bonus question. If you solve it you get more marks. What I have done is I have included only the model answer, but I have not included the marking scheme. Similarly, I have not included answer for a what you call the optional question. My request to you is when you meet in the team in the lab session after of course you examine and explore those five processing programs and so on, do the following timbers. Allocate questions between members of your team. Define a marking scheme for the allotted questions. So, you have four of you or five of you or three of you, allocate these nine questions. Quickly go through the answers. You do not waste time in solving those problems. Model solutions are given. Read through those solutions. Again you do not have to be very fidgety about reading each and every line. Broadly find out in what components you can divide that answer and how you could award partial mark. Somebody had suggested negative marking. You may also indicate that this if somebody does something like this it should be given minus one mark or whatever. After that discuss these and finalize the marking scheme for all questions in the sample paper. Now I do not want you to do any submission for two reasons. One it will waste your time and second it will put a load on model and model is already cracking. But it is important that this small effort that you do. It may not take you more than half an hour or so. But my request is please spend that time. Why? Because this is the kind of collaboration that your team would be doing subsequent to end of this workshop. Remember you have to set quiz questions of simple, medium and complex difficulty and you have to set a test question. You have to give model answers for all of them and you have to of course define a project that is a separate thing. This little exercise of half an hour will tell every one of you in your team exactly what is the approach each one takes. You will get to know each other more in the context of this kind of exercise. I believe that it will help you coordinate your activities better later. No submission is required on the model as I said. There is a submission required related to your team activities and that submission is to describe the logistics that you are planning to complete this assignment. That is how have you allocated work. So you will have to have a major discussion in the last session today where you will say alright I will do complex question, quiz question, you do the test question or two of you will do this, maybe project definition or something like that. You first volunteer otherwise the project team leader will have to allocate that task. You will have to define the logistics of when you will interact, what is the deadline for first submission. There has to be some kind of a peer review. So you must send emails to each other on or before the deadline. Then you must review in the stipulated time and give a feedback and within one or two such exchanges you must come up with the final form in which you might want to submit simple question, medium question complex. You must give enough time to the coordinator to type in, you will always give soft copies or email but the coordinator will have to consolidate these in the format in which the final thing has to be uploaded. Now this is not an extraordinary exercise but I want you to utilize this to define collaborative mechanisms and understand them better and follow them better. So I have now, we have done the college of engineering. My question is related to structure. When we define the member of structure once we specify the bit field. So what is the actual use of that bit field? Now we have not discussed the bit data type. The bit is actually one bit and you can define an array of bits. These bits are often used in programming an individual bit can only be used as a flag. It is either true or false. It is either zero or one. Now there are several situations. For example, you want to represent, let us say certain, let us take the case of the student record itself. A student has roll number, a student has this, a student has that. Now consider that you have a record in which you are keeping information about the marks scored by the student in four different examinations. You are keeping information about whether the student has paid the fees or not. You are keeping the information about student has cleared the hostel dues or not. Now that information will be there in the fees paid on this date or the marks scored so many etcetera, etcetera. But if you just want to know whether the student has done this or not done this, then you might define a bit field, an array of bits in fact, say 8 bits or something in which each bit is set to either zero or one depending upon whether the student has appeared for the exam or not appeared, whether the student has cleared the hostel dues or not etcetera. In data processing, when you read the record, you need to just look at these bits, do some and or operation and you will be immediately able to discover things without processing the details of other information. This one such you said, you can think of many you said, wherever you need to keep information about yes or no kind, a bit field is adequate. But please remember, if you define a component which is just one bit, the actual storage allocated is always minimally one byte. But as far as you are concerned, you have only one bit and you can do and or operations, bitwise operations on those bits. Good afternoon sir. My self diversion act from S&PIT demo center. My question is, can we use doc file or executable file in C plus file handling environment? Of course, you can use absolutely every file. In fact, please remember that a dot exe file is also stored in the desk and the operating system actually reads that file and actually loads it in the memory. What you will do with that doc file or what you will do with that executable file is not very clear to me. The doc file is often read by a program which has created it, such as Microsoft Word. Microsoft Word knows exactly what component of doc file contains what, unless you know the format, you may not be able to do much meaningful thing. Similarly, the exe file will contain some header record and some other information and mostly executable code. But absolutely surely, you can open any file, read any file, write to any file. In fact, a very naughty thing would be to open somebody's executable file, write some gibberish byte somewhere in between so that that executable file can never execute in life. I am not suggesting you do that. I am only saying that anything is possible. Right. Dilai Institute of Technology in Durga. I am Shruti Khattacharya and my question is related to pointers. We teach our students that there are three types of pointers. They are near pointer, far pointer and huge pointer. When it comes to giving examples, we really don't have some good examples of programs based on far and huge pointers. But there is a very good book by Mr. Yashwan Kanithkar that is Understanding Pointers and See. But the programs provided in that book are too lengthy and I think it is out of scope for a first year student. You are very right. The far pointers and huge pointers nearly represent pointers which point to very large memory consuming objects. Programmatically, there is no difference whatsoever. A pointer is a pointer. So, just as you will say that an int pointer is different from a float pointer, it is different only in the sense that it points to a specific type of data in exactly the same way the far and huge pointer, long pointer. They are all pointers which point to different type of values. Otherwise, there is no reason to distinguish them from any other pointer and they should be used exactly in the same way that normal pointers are used. It is only the word far and huge which create a very interesting doubt in people's mind. But I don't think you should worry about it. You said, you use the term that this is outside the scope of first year student. Instead of using the word scope, I would use the word that they do not need it while learning computer programming and even later in most of the programming they would need it. But whenever they require, they would be able to read it and understand it. So, do not worry about that. Vivekanth and College of Engineering. Good afternoon, sir. I am Malathi from Vivekanth College of Engineering for Women, Tamil Nadu. The question is, can we multiply two pointer variables? Can we multiply two pointer variables? That's a very imaginative idea. So, let me tell you a story. Somebody, this is about ten years ago I read, you know correlation in statistics. You can correlate data of different things and find out what is the correlation. Somebody actually studied the growth of population in China and the growth of number of electric poles installed in United States and found that there was very high correlation. The question was, why would anybody on earth try to find out that correlation? The reason I am telling you this joke is that why would you think of multiplying pointers at all? A pointer is pointing to a memory location. Another pointer is pointing to another memory location. In fact, you would never even think of doing arithmetic operations amongst pointers. So, adding pointer, multiplying pointer, subtracting one pointer from the other has absolutely no sense. Pointers are pointing to an entity or to a set of entities such as an array. The pointer arithmetic should therefore, in my opinion, be limited to a, extracting the value of the address of an entity and assigning it to a pointer, be incrementing or decrementing the pointer appropriately so that you can scan over consecutive locations typically in the context of an array. I humbly suggest that any other operation with the pointer is completely meaningless in the context of programming. So, if your student has asked you this question, what would happen if you multiply into pointers, your polite answer should be chaos will result, that's all. Vidya Pratishan College of Engineering. Good afternoon, sir. This is Dinesh Jinde from Vidya Pratishan Baramati. My question is what is the difference between a null pointer and a void pointer and what are the applications of that? I am happily surprised that you are asking a difficult question. I had never used a void pointer in my life, although I thought I had done a lot of CC plus programming in my time. I have a friend here. Why don't you tell them your name and give the answer? Yeah, good afternoon. My name is Pratish and I am presently an M.Tech student at IIT, Fombe. So, what I feel is that when we use, say, int star x, what we mean is that we have an x. X is a pointer variable that points to a variable which contains an integer value. But when we say void star x, so we do not define what type of value x is pointing to. So, before using void, we actually need to do typecasting. So, we have to typecast as in to specify what type of variable x shall be pointing to. Okay, okay. I have now understood. Thank you very much, Pratik. And thank you very much for asking this question from Baramati. I now understand a void pointer as some kind of a placeholder. I do not know where I will use this pointer. So, I define a void pointer and keep it around. Now, depending upon where I want to use it, I will do a typecast so that temporarily that void pointer becomes pointer to either an int or a float and after doing that typecast, I can use that pointer for that purpose. I presume that it also permits me that somewhere later in the program, I can read typecasting to something else and use it in connection with someone else. Wonderful. So, this means I can define an array of void pointers without letting the compiler know initially what I am going to associate with it. I think this is some kind of cheating, but that is good. Thank you for very interesting questions.