Home
Assignment 9
Assignment 9 is out. This assignment is worth 3.5% and is due on Friday 11:59pm (but you can submit by next Tuesday 11:59pm without late penalty).
Lecture 12
In this final lecture of CS1010, we will bridge you towards CS2040C and C in the real-world. We will cover C struct and standard I/O.
Assignment 8, Exercise 11, Exercise 12
Assignment 8 is out. This assignment is worth 4% and is due next Tuesday 11:59pm.
Exercise 11 is also available. This exercise contains PE2 questions from AY20/21.
Exercise 12 is the last exercise for CS1010 and contains two questions on recursion. We will go through one question from each of these exercises during the lab today.
Lecture 10
We revisit recursion in this lecture. We will look at more complex problems that can be solved by using recursion. In particularly, we will study the Tower of Hanoi puzzle, the generation of all possible permutations, and the n-Queens puzzle.
Deadline for Assignment 7
As announced on Piazza, you can submit your Assignment 7 before 9 AM on Wednesday 27 October 2021 without penalty.
Assignment 7 and Exercise 10
Assignment 7 is out. This assignment is worth 3.5% and is due next Tuesday 11:59pm. Start early!
Exercise 10 is also available. This exercise contains PE2 questions from AY18/19. We will go through at least one question during the lab today.
Lecture 9
In this lecture, we will explore two basic computing problems: searching and sorting. In particular, you will learn about binary search, bubble sort, and insertion sort.
Assignment 6 and Exercise 9
Assignment 6 has been released. This assignment is worth 4% and is due next Tuesday 11:59pm. Start early!
Exercise 9 is also available to be completed during the lab session this week.
Lecture 8
We will cover three different topics this week. First, we will wrap up our discussion on arrays with Unit 19 on multi-dimensional arrays. Then, we will explore deeper into compilation process, particular on several useful pre-processing directives. Finally, we will prepare you for the next segments of CS1010, by exploring how we can measure the efficiency of an algorithm using the Big-O notation.
Assignment 5
Assignment 5 has been released. This assignment is worth 3% and is due next Tuesday 11:59pm.
Exercise 8
Exercise 8 is now posted. This exercise consists of three questions on string operations.
Lecture 7
In this jam-packed lecture, we delve deeper into pointers, memory, and arrays. We will start by introducing the referencing and dereferencing operators, and show how they can be used to pass an argument by reference. We then explore heap memory management, and use it as the basis for dynamically-sized arrays. Finally, we will look at a special type of arrays -- the strings. THis lecture covers Units 15-18.
Assignment 4
Assignment 4 is posted. Due to the coming PE, this assignment is released a day ealier, is due a day later, and has only two questions. The assignment is due on Wednesday midnight, on 6 October, 2359.
Assignment 3
Assignment 3 is posted. This assignment is due after the recess week, on 28 September, 2359.
Exercise 6
Exercise 6 is posted. This consists of the PE I question from AY 2021/22 Semester 1.
Exercise 5
Exercise 5 is posted. Give it a try after completing your Assignment 3. Exercise 5 contains very simple problems that you can solve with fixed-length arrays. If you are new to programming, we encourage you to try it out before completing Assignment 3.
Lecture 6
Lecture 6 consists of two parts. In Part 1, we will delve deeper into how functions are called in C (and other languages), to get a better understanding of the behavior of your program. We will learn how call stacks works. In Part 2, we will start exploring arrays in C. We will focus on fixed-length arrays for this lecture.
Exercise 3
Exercise 3 is posted. Give it a try after completing your Assignment 2. Exercise 3 contains very simple problems that you can solve with five commonly used "patterns" of loops. If you are new to programming, we encourage you to try it out before Exercise 4 and Assignment 2, which builds upon these patterns to solve more complex problems.
Lecture 5
In Lecture 5, we will discuss how we can reason about our code using assertions, how we can control the flow of C programs with loops, and how to reason about the behavior of loops with invariants.
Assignment 1
Assignment 1 is released. The assignment is due on 7 September 2021, 11:59 PM, and contributes to 3% of your final grade.
Lecture 4
In Lecture 4, we will see how we can control the flow of C programs with conditional if-else
statements, how to expression conditions with logical expressions, and how we can reason about our code with assertions.
Lecture 3
In our third lecture, we will start to write some simple C programs. We will learn about how to write C functions, how to read and write , and how to perform arithmetic operations.
Lecture 2
This week, we will examine two concepts that are central to programming: functions and types.
Lecture 1
Given that the first lecture for CS1010 falls on the National Day, I have recorded the lecture and have posted it on LumiNUS Multimedia.
We covered lots of adminsitrative details today, and started with Units 1 and 2 on what is a program, what are computational problems, and what is an algorithms. As a concrete example, we went through finding the largest value from a given list.
Here are the videos, slides, and self-diagnostic quiz (due on Wednesday 2359).
Getting Ready for CS1010
Welcome to CS1010! Here are some things that you can do while waiting for the semester to start.
Take a Look at General CS1010 Information
Take a look at the crucial information about CS1010 here. Scan through the learning outcomes to know what you are expected to learn in this module.
Note down the important dates on your calendar.
Read about CS1010 Policies
The general policies for CS1010 is posted. Go through it to see what is expected.
Enable Your Piazza Account
You should have received an email inviting you to create a Piazza account and enroll in the module Q&A forum. Please join CS1010 on Piazza.
Enable Your SoC Account
Go to https://mysoc.nus.edu.sg/~newacct and create your SoC Unix Account if you have not done so. Activate "General Unix Servers" and "The SoC Compute Cluster" in MySoC here: https://mysoc.nus.edu.sg/~myacct/services.cgi
Create a GitHub Account
Create a GitHub account if you do not have one. This account should stay with you for your professional career. So choose the username wisely. Then, tells us your GitHub Username here before 13 August 2021, Friday.
Get a Head-Start with Unix and Vim
You can check out the content for SoC Unix@Home Workshop, which was held last year. The website contains notes with examples, which you can follow through. If you have questions or face any issues, ask on Piazza.
You can also find more notes under "Software/Tools".
Read Feedback on CS1010 from Last Year Ago
This semester's CS1010 will be conducted in a similar style with the version in AY2020/21. Read the comments from that batch of students to know what to expect.
Explore Some Additional Readings
Some extra reading materials curated by Wei Tsang are available. If you have some programming background and are wondering why we are teaching C, read the articles under Why C section.