0

My professor is using automated scoring program for my programming assignment. It is C programming handling some file stuff.

He asks students to use Ubuntu version 18.xx and gcc 7.xx. and I asked him if I can use the later version of those, which are 20.xx, 9.xx respectively. and he's not so sure about it with saying that might not be the problem but just in case use the exact version.

I don't want to delete the current Ubuntu, gcc and re-downloaded the exact version he mentioned, because it might take some time and I have to keep using this laptop for many more assignments from other classes. I want to use the later version (seems like quite a big gap between 18.xx, 7.xx and 20.xx, 9.xx)!

Are there any potential problems for using my current version?

user438383
  • 5,716
  • 8
  • 28
  • 43
hoo
  • 67
  • 4
  • 1
    It's difficult to say without knowing more about the situation. What exactly are you going to be doing for this class. C programming? – Daniel Walker Apr 04 '22 at 03:05
  • 1
    Are you submitting source code or executables? If you submit source code, your OS doesn't matter. If you're submitting executables, dynamic linking should usually make them compatible as well. – Barmar Apr 04 '22 at 03:06
  • I submit only source codes. The class is about "file processing" and I am currently using standard library functions like fopen, fclose, fwrite,... in . I am not sure what my assignments be like later in the course. would it be the problem if I ever use the system calls later in the course? – hoo Apr 04 '22 at 03:14
  • 1
    In most cases the two versions will be interoperable as long as used for the class assignments, but I cannot guarantee. If I were the professor, I would answer in the same manner as your professor does. If I were a student, I would follow him/her. You can make your decision *at your own risk*. – tshiono Apr 04 '22 at 04:12
  • 1
    Can't you test your code in the cotrect environment (school computer, virtual machine) before submission? – hyde Apr 04 '22 at 05:04

1 Answers1

1

It would also be possible to check the default standard of the gcc version used by your teacher and use the corresponding std flag : "-std=c11" for example.

(I'm unfortunately in a rush and can't check it yet but when I have more time, I can try to look it up if you still didn't get the information)

It may also be possible that he already uses a specific standard, in that case it's better to ask him.

Bugs might arise but I think it would be pretty negligible if you use the same standard.

Otherwise if you are using a Debian based distro you can also install his gcc version alongside your actual one and use them with "update-alternatives". If not you can use a Docker container.

Something to look for is also if you are going to use OS specific library or functions : For example Windows is not POSIX compliant so I had to use WSL but linux (and mac aswell if I remember correctly) are.

Zefaryo
  • 31
  • 6
  • How about using Docker? you think it's a good idea to use it? I'm currently using Mac. – hoo Apr 06 '22 at 03:18
  • 1
    @hoo If you are on Mac, unless you want your development environment containerized (to have multiple version of gcc for instance), I would just install the the latest version of gcc and use the teacher's specific standard because if I remember correctly Mac is POSIX compliant and you have access to BSD Facilities (https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/BSD/BSD.html). So unless you do some pretty OS specific things which requires Ubuntu, you should be good to go in my opinion – Zefaryo Apr 06 '22 at 08:11