$19
1.1 Things you were expected to do this week:
A. Get familiar with the web portal. This is the medium you will communicate with the instructor. The website has different sections
a. Resources: You will have folders dedicated for each purpose. The are for lecture notes, demo codes and HW.
b. Messages: You use this tool to communicate with me. If you click on my name or instructor role, I get the email from you.
c. Forum: this is the place where all of you hang around. If you post anything there, it is broadcasted. This is brainstorming place for you to discuss concepts among yourselves. Don’t share your code with fellow students. I am not very active there, but, will respond time to time if needed
d. Annoucements: Read through them. They have lots of goodies.
B. Install your choice of C Compiler. You can use Visual Studio, XCode, Eclipse for C with GNU compiler if you have non-windows OS. Follow the instructions in respective websites:
a. Visual Studio 2012 or 2013 Express is free from Microsoft. It allows you to develop application using .NET, C# and C++. You will use C++ compiler to do the C development in this class. C is subset of C++. Go to the link below and follow the instruction to install. http://www.microsoft.com/en-us/download/details.aspx?id=34673(2012)
Download and install wdexpress_full.exe
b. Eclipse: You can use eclipse IDE for C/C++ developers. Please read the instruction ‘before you begin’ to make sure you have C compiler installed (compiler does not come with Eclipse) http://www.eclipse.org/downloads/moreinfo/c.php
c. Cygwin: You can also use Cygwin with gcc compiler. http://www.cygwin.com/
1.2 Here is the demo for printing “Welcome to the class of C Beginners” on the screen
#include <stdio.h>
int main (int argc, char* argv[])
{
printf("Welcome to the class of C Beginners\n"); return 0;
}
Create a project in Visual Studio (or your own IDE) following the instruction I provided in separate documents. Add a .c file and type the above code. Compile, build, and then run it. Observe the output.
What would you need to change if I asked you to display “Welcome” in one line and “to the class of C Beginners” in another line? Try it. Hint: what do you think \n is doing? Try putting \n in other parts of the sentence and see what happens.
1.3 You only have seen printf function in C as of today. Modify the code in 1.2 so that it displays the HELLO as shown below.
***
***
********
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
*************
********
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
***
********
********
********
***
1.4 Modify the code in 1.3 so that it displays the HELLO as shown below