2017.1 Basic Computer Programming
Professor : Bong-Soo Sohn
- Sample code for line, word, alphabet counter (input: serveal lines of strings, the last line string should be "0".): count.c
- Homework 4 (Due: June 12th, 11:59pm)
- Final Exam
- Time: 3pm, June 19th (Mon)
- Place: 310-728
- If you are late more than 30 minutes, you will not be allowed to enter the exam room.
- Download Final Exam PDF files (2009 , 2010 , 2011, 2012, 2015, 2016
- Homework 3 (Due: June 5th, 11:59pm)
- Homework 2 (Due: May 15th, 11:59pm)
- Midterm Exam
- Time: 3pm, April 24th (Mon)
- Place: 310-728
- You have to bring your photo ID card (student ID card).
- If you are late more than 30 minutes, you are not allowed to enter the exam room.
- Download Midterm Exam PDF files (2009 , 2010 , 2011, 2012, 2015, 2016)
- Homework 1 (Due: April 17th, 11:59pm)
- Class begins March 6th!
- lecture 1 : Class Overview
- lecture 2 : Introduction to Computer Systems
- lecture 3 : Introduction to C Programming
- lecture 4 : Variables and Data Types
- You may insert #define _CRT_SECURE_NO_DEPRECATE at the first line of your code to use scanf function.
- lecture 5 : Basic Standard I/O
- lecture 6 : Operators
- lecture 7 : Control Structures (if-else, for, while, ...)
- lecture 8-1 : Functions (Basic)
- lecture 8-2 : Functions (Recursive Function)
- lecture 8-3 : Functions (Call Stack, Random Function)
- lecture 9-1 : Array
- lecture 9-2 : Sorting and Searching Using Arrays
- lecture 10-1 : Pointers
- Supplementary Materials for Pointer
- Pointer Source Codes :
- lecture 10-3 : Pointer-to-Pointer
(i) multiplication, ex) z=x*y;
(ii) pointer declaration, ex) int *x;
(iii) dereference operator (the-value-of), ex) *x=5;
(i) bit AND operator, ex) z=x&y;
(ii) address-of operator, ex) x=&y;
- lecture 10-2 : Strings
- fgets() , gets()
- gets() function was deprecated because of a safety problem. Instead, you may use fgets function (e.g. fgets(buf,100,stdin); ) to read one line string from a keyboard. In this case, you have to be careful in handling the new line character '\n' in the string.
- Sample code for line, word, alphabet counter : count.c