Difference: Session2:CProgramming (1 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"

Revision 22017-09-13 - uli

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

Session 2: Basic C programming

PC systems:

Line: 9 to 9
 Install gnuplot and eclipse on all machines If there is time install CDT, the development perspective for C/C++into eclipse. Do eclipse installation only at the end of the session.

Check if ssh works from any to any machine. If not install openssh-server on all machines. The ssh client should be there, but please check. Go to one machine where you are sure sshd is working and log into all the other machines one by one.

Added:
>
>
Make a list of MAC and IP addresses for all of the machines. Are they fix or do they change from one day to the next?

If they are fixed, then edit the /etc/hosts files and add IP addresses and host names for all of the machines. Do this on one machine only. Then you may copy this file to /tmp of another machine using scp and edit the /etc/host file there using cut and past from the copied file.

If the IP addresses change then we will have to talk to out network friends and ask them to enter fixed IP addresses for these machines in the DHCP server.

 

Student exercises

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?

Line: 19 to 25
 
<--/commentPlugin-->
Changed:
<
<
META FILEATTACHMENT attachment="tutor_2.odt" attr="" comment="" date="1505121922" name="tutor_2.odt" path="tutor_2.odt" size="14055" user="uli" version="1"
>
>
META FILEATTACHMENT attachment="tutor_2.odt" attr="" comment="" date="1505294671" name="tutor_2.odt" path="tutor_2.odt" size="16867" user="uli" version="1"

Revision 12017-09-11 - uli

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

Session 2: Basic C programming

PC systems:

Check if new updates have arrived and if yes install them on all machines

  • apt update

  • apt upgrade

Install gnuplot and eclipse on all machines If there is time install CDT, the development perspective for C/C++into eclipse. Do eclipse installation only at the end of the session.

Check if ssh works from any to any machine. If not install openssh-server on all machines. The ssh client should be there, but please check. Go to one machine where you are sure sshd is working and log into all the other machines one by one.

Student exercises

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?

-- Uli Raich - 2017-09-11

Comments

<--/commentPlugin-->

META FILEATTACHMENT attachment="tutor_2.odt" attr="" comment="" date="1505121922" name="tutor_2.odt" path="tutor_2.odt" size="14055" 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