Difference: Session2:CProgramming (2 vs. 3)

Revision 32017-09-20 - uli

Line: 1 to 1
 
META TOPICPARENT name="TutorSessions"

Session 2: Basic C programming

PC systems:

Line: 19 to 19
  Go through the student exercises and check how far they can get in a single exercise session. I presume that we will have to shift the last exercise (sine function) to the next session?
Added:
>
>
We have a problem with the lecturers' user names: The Ubuntu OS has been re-installed on Monday, replacing the previous 32 bit OS by a 64 bit one. Your files are still all there but your users have gone and I cannot re-create them because I do not know the passwords.

Please call me in to re-install your user and give you back access to your files. Sorry for the inconvenience, however, we had to do this because the 32 bit system is deprecated (even though still supported for the moment) while the 64 bit system is the one that will be further developed.

Ike has asked the students to solve the exercise on the calculator as home work. I have received 6 answers (out of 15) and I have picked one of the solutions at random and attached the files as I have received them from the student. The files are:

  • calculator.c
  • divide.c
  • mult.c
  • plus.c
  • sub.c
First of all I would congratulate the student that he has actually done the work and sent it in.

From the lecturers I would like to know, which improvements to the solution can be made.

Then please try the multiplication: calculator num1 * num2 does not work! while all the other operations do work perfectly. What is the problem?

I have added a few more code examples and renamed the tar.gz file to newCodeExamples.tar.gz. Download this and unpack it. Have a look at textAndData and analyze the code. Do you understand everything and are you able to explain this to the students?

Then there is a directory called lottery. Have a look at the code in lotteryLux.c and analyze it. What is it supposed to do and how does it try to accomplish the task?

Finally do the last C programming exercise, look at the output file, which should be in text format. Can you plot the results in libreOffice and with gnuplot?

Can the students do the calculator and the sine exercise within 3 h?

 -- Uli Raich - 2017-09-11

Comments

<--/commentPlugin-->
Changed:
<
<
META FILEATTACHMENT attachment="tutor_2.odt" attr="" comment="" date="1505294671" name="tutor_2.odt" path="tutor_2.odt" size="16867" user="uli" version="1"
>
>
META FILEATTACHMENT attachment="calculator.c" attr="" comment="" date="1505904484" name="calculator.c" path="calculator.c" size="339" user="uli" version="1"
META FILEATTACHMENT attachment="divide.c" attr="" comment="" date="1505904484" name="divide.c" path="divide.c" size="329" user="uli" version="1"
META FILEATTACHMENT attachment="mult.c" attr="" comment="" date="1505904484" name="mult.c" path="mult.c" size="330" user="uli" version="1"
META FILEATTACHMENT attachment="sub.c" attr="" comment="" date="1505904484" name="sub.c" path="sub.c" size="326" user="uli" version="1"
META FILEATTACHMENT attachment="plus.c" attr="" comment="" date="1505904484" name="plus.c" path="plus.c" size="325" user="uli" version="1"
META FILEATTACHMENT attachment="tutor_2_v2.odt" attr="" comment="" date="1505906120" name="tutor_2_v2.odt" path="tutor_2_v2.odt" size="21958" user="uli" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback