In-Class
Activity 1 - C Programming Lab
The following are some tasks to get acquainted with C programming.
- Write a program with a function that computes the factorial of the first N numbers. Example Factorial: 4! = 4*3*2*1
- Write a program that creates a function, and modifies the value passed in. Remember, C is a pass by value language. You will have to create a pointer.
- Start running through some tutorial on learn-c to get up to speed on C programming. Investigate struct's, and proceed with the following problem.
- Write a program that creates a struct(call it "student"). It should have a int for age, and an int for student id. Create 50 of these students and loop through them in a program.
Activity 2 - Printing in binary (Optional -- will be handy later!)
- Write a function that takes an integer, and prints out its value in binary.
- Write a function that takes an integer and prints out its value in hex.