

Stay tuned! As a simple exercise, try to modify the program so that it actually prints your name instead of the text "Your name". To compile and execute your program you need to get to the directory C:/Users/b1234567/EEE1008/ by changing your current directory with the cd (stands for change directory) command.Ĭongratulations! You have just written, compiled and executed your first C program! It's alright for now if you have no idea what's going on, soon it will all become clear. Remember you had to take note of its location? Let's assume its location is C:/Users/b1234567/EEE1008/hello.c. Navigate to your program with Cygwin Terminal The first option you get is likely to be the Cygwin64 Terminal - this is what you need. You can do that in a similar way you did with Notepad++: hit you Win key and type Cygwin. We will be using the GCC compiler as a command line application, so we need to access the command line (also known as terminal). In the next step we will use the GCC compiler to get an executable file. To do that, we need to translate out program into the form computers understand and execute. We need to make the computer to execute it. Once the first program has been written, we want to find out what it actually does.


You must carefully note the location of the saved file, it should be something like C:/Users/b1234567/EEE1008/hello.c, where b1234567 is your student number. Yes, this is your first C program! Now you can save the file somewhere, choosing C source file in the Save as type drop-down menu, and naming it hello.c. * hello.c A first program in C */ #include int main()
