Course title
L0404900
Introduction to Programming 2

sasano isao Click to show questionnaire result at 2017
Course description
Programming languages and algorithms constitute the core of information science and engineering. In this class we learn basic constructs in the programming language C, which is a widely-used language and let students solve some exercises. Though solving exercises students experience designing algorithms and write programs. Although this class does not cover all the constructs in C, we aim at understanding core of C so that we can acquire constructs, which this class does not cover, as needed from the next semester.
Purpose of class
By taking this class we learn core of the language C. We acquire the computational model of imperative programming through the C language, which may help us to acquire other imperative languages or object-oriented languages.
Goals and objectives
  1. Understanding the syntax and semantics for basic constructs in C (variable declarations, assignments, iterations, blocks, function declarations, types) and being able to write programs by freely combining them.
  2. Being able to use library functions that relates input/output of files (including standard input and output) among standard C libraries (libc).
  3. Being able to design algorithms and write programs in the language C for given simple exercises.
Language
Japanese
Class schedule

Class schedule HW assignments (Including preparation and review of the class.) Amount of Time Required
1. In each lecture, in the former half we learn some constructs or concepts in C language and in the latter half we solve two exercises concerning the contents in the former half. Materials are put on the lecture web page.

Types and operations, Conditional branches, evaluation of expressions
- The four basic arithmetic operations (addition, subtraction, mutiplication, and division)
- integer types, floating types
- cast operator
- if statements
- evaluation of expressions
- relational operators like < and <=
Recall how to use emacs and gcc command. 80minutes
2. Compound statements, iterations, labels
- while statements
- for statements
- labels, goto statements
Study compound statements, iterations, and labels. 90minutes
3. Expression statements, assignment expression, logical operators, break statement, continue statement
- assignment operator =
- logical operators &&, ||, !
- break statement, continue statement
Study expression statements, assignment expression, logical operators, break statement, and continue statement. 90minutes
4. Declarations of arrays and variables, initialization
- syntax for variable declarations
- multi-dimensional arrays
Study declarations of arrays and variables, and initialization. 90minutes
5. Functions
- syntax and semantics of function declarations
- syntax and semantics of return statements
- syntax and semantics of function call expression
- scope of formal arguments
Study functions. 90minutes
6. Basic types, strings
- integer types: char, short int, int, long int
- floating types: float, double, long double
- octal escape sequences
- strings, string literals
Study basic types and strings. 90minutes
7. Mid-term examination
- pencil-and-paper examinations for checking whether or not we understand the contents from the first to the seventh lectures and explanations for the problems after finishing the examination.
Review everything until the last time. 90minutes
8. Pointers
- operator &
- pointer types
- operator *
- addition and subtraction between pointer and integers
- passing arrays to functions
- abbreviation of formal parameters of pointer types
Study pointers. 90minutes
9. Structures
- structure types
- accessing members of structures
- initialization of variables of structure types
- naming types by typedef
- passing structures to functions
- arrow operator
Study structures. 90minutes
10. Dynamic allcations
- heap
- calloc function
- sizeof operator
- free function
Unions, enumerations
Study dynamic allocations. 90minutes
11. Various constructs, input/output of files
- comma operator
- operators ++ and --
- library functions fopen, fclose, fprintf, and fscanf
Study the comma operator, the operators ++ and --, and the library functions fopen, fclose, fprintf, and fscanf. 90minutes
12. Exercises (1)
- We solve a little complex problems.
Review everything until the last time. 90minutes
13. Exercises (2)
- We solve a little complex problems.
Solve the exercises not yet solved. 90minutes
14. Final examination
- pencil-and-paper examinations for checking whether or not we understand the contents from the first to the 14th lectures and explanations for the problems after finishing the examination.
Review everything until the last time. 90minutes
15. 90minutes
Total. - - 1340minutes
Relationship between 'Goals and Objectives' and 'Course Outcomes'

exercises mid-term exam final exam Total.
1. 6% 18% 24% 48%
2. 2% 0% 2% 4%
3. 6% 18% 24% 48%
Total. 14% 36% 50% -
Evaluation method and criteria
Basic exercises are evaluated on a 14-point scale, mid-term exam a 36-point, and final exam a 50-point. When the basic exercises is E points, the mid exam M points, and the final exam F points, the overall score is
E+M+F*(100-(E+M))/50.
Note that the score of advanced exercises is added to the above score up to the full points.
Textbooks and reference materials
We use the following text book (in Japanese).
「新・明解C言語入門編」,柴田望洋著,SBクリエイティブ
Although in the class we do not use the text book directly and do not explain following the text book, the contents of the lectures are mostly written in the book. We give lectures so that we can acquire the core of C language without the book, but we recommend that all students purchase the book. We can learn contents that are not covered in the class by reading the book by ourselves. In the class we learn dynamic memory allocation, which is not covered in the book,
and we do not learn bit operations, switch statements, compound assignment operators and so on, which is covered in the book, in the class.

We recommend the following book for those who want to learn more.
「新版明解C言語実践編」, 柴田望洋著, ソフトバンククリエイティブ

When taking a look at some terms of C language or library functions, the following dictionary is useful. In paticular, all the items for library functions include example usage, which help us to write programs in the future. Unfortunately, it is difficult to purchase this book currently.
「新ANSI C言語辞典」,平林雅英 著,技術評論社
Prerequisites
Introduction to Programming 1
Office hours and How to contact professors for questions
  • Friday 13:10-14:50 or any time agreed on by email
Relation to the environment
Non-environment-related course
Regionally-oriented
Non-regionally-oriented course
Development of social and professional independence
  • Course that cultivates a basic problem-solving skills
  • Course that cultivates an ability for utilizing knowledge
  • Course that cultivates a basic self-management skills
Active-learning course
About half of the classes are interactive
Last modified : Wed Oct 17 06:48:43 JST 2018