Presentation is loading. Please wait.

Presentation is loading. Please wait.

COP 3275 COMPUTER PROGRAMMING USING C Instructor: Diego Rivera-Gutierrez

Similar presentations


Presentation on theme: "COP 3275 COMPUTER PROGRAMMING USING C Instructor: Diego Rivera-Gutierrez"— Presentation transcript:

1 COP 3275 COMPUTER PROGRAMMING USING C Instructor: Diego Rivera-Gutierrez djrg@cise.ufl.edudjrg@cise.ufl.edu http://cise.ufl.edu/~djrg/http://cise.ufl.edu/~djrg/ https://ufcprog2015.wordpress.com/

2 LET’S BACKTRACK A BIT! Did you guys register for a CISE account? If not, do so soon! http://register.cise.ufl.edu/http://register.cise.ufl.edu/ Why do we need an account? All homework projects are expected to work on the CISE Linux machines! So, if your program doesn’t run, “But it works on my laptop/computer” will not be an acceptable excuse!

3 SETTING UP YOUR PROGRAMMING ENVIRONMENT

4 SO HOW DO I ACCESS A COMPUTER TO TEST MY PROJECT? Multiple ways! (Once you have registered for an account) 1.You can always go to one of the CISE computer labs and login to your account there: https://www.cise.ufl.edu/help/access https://www.cise.ufl.edu/help/access 2.You can do remote access to one of the servers.

5 QUICK POLL

6 CONNECTING TO A REMOTE TERMINAL Windows Putty is your best option Putty Mac OS From a terminal you can always do SSH. To do so: Open a Terminal Type: ssh @thunder.cise.ufl.edu For example: djrg@thunder.cise.ufl.edudjrg@thunder.cise.ufl.edu

7 UPLOADING FILES TO MY ACCOUNT Windows WinSCP is your best option WinSCP Mac OS Any SFTP client will do Options: Cyberduck FileZilla

8 I’M IN A REMOTE TERMINAL… NOW WHAT? So you should see something to the effect of: The first word (thunder/storm) tells you which server thunder.cise.ufl.edu and storm.cise.ufl.edu are both available to you The number (22/25) is a “command number” and is pretty irrelevant What should I do next? thunder:22%storm:25%

9 RELEVANT COMMANDS A list of useful commands is here: http://www.computerhope.com/unix.htm http://www.computerhope.com/unix.htm CommandFunction man Provide manual for the command cd Change current directory/folder to lsList contents of current directory pwdPrint working directory mkdir Make a new directory with the name cp Copy file to location rm Remove/Delete the file with name mv Move/Rename file to location/name nanoOpen a file editor named nano(also known as pico) nano Open with nano cat Outputs the contents of file to the terminal

10 BY FAR THE COMMANDS YOU WILL USE THE MOST Compiling commandsFunction gcc.cCompile the C program file with name.c, use the generic output name a.out gcc.c –o.outCompile the C program file with name.c, use the output name.out We will discuss these two in more detail on Friday (gcc compiler)gcc compiler Now… what does.c looks like? (AKA what did I get myself into by taking this class?)

11 LET’S WRITE A SIMPLE PROGRAM! Notice: I’ll be using Notepad++ and pico/nano. You are free to use any IDE of your choosing, under two conditions: 1)You will have to figure out how to use them on your own (Neither me, nor Rahul the TA will be able to help you if you use an IDE we are not familiar with) 2)Your projects need to work correctly on the CISE servers using the compile lines we will provide.

12 THE HELLO WORLD PROGRAM #include int main(void) { printf("Hello World!"); return 0; }

13 THE EVEN BETTER “HELLO WORLD” PROGRAM #include int main(void) { printf("Hello World!\n"); return 0; }

14 POTENTIAL CONTENT FOR REST OF THE CLASS Other escaped characters (\n,\\,\”, \t, etc) Data types: char, int, float. Variable declarations. Formatted printfprintf


Download ppt "COP 3275 COMPUTER PROGRAMMING USING C Instructor: Diego Rivera-Gutierrez"

Similar presentations


Ads by Google