- 爱上C语言:C KISS
- 徐昊 夏瑀等
- 468字
- 2021-04-01 17:57:22
1 PROGRAMMING IN C:AN OVERVIEW
Learning objectives
1.Getting to know basic C language primitives,constructs,functions and pointers and clearly understand what they are without going in too much details.
2.Understanding the meaning of tools and their roles in the programming environment.
3.Mastering debugging capabilities to leverage own learning autonomy out of the classroom.
Theoretical contents
1.C program development cycle.
2.Basic programming tools and concepts:
a.What is an assembler?
b.What is a debugger?
c.Why using a debugger?
d.What is a compiler?
e.What is an interpreter?
f.What is a linker?
g.What is a preprocessor?
h.Overview of different kind of file formats.
3.Playing with basic C language primitives and data types:
a.C program skeleton.
b.Built-in types.
c.What are variables and constants?
d.What is a comment?
e.Type definition and structure.
4.Playing with C language constructs:
a.Sequential composition of statements.
b.Branching.
c.Loop.
5.Playing with C function and pointer.
Strategies andactivities
1.Presenting all C language primitives,constructs and advanced features(e.g.,function and pointer)in terms of what they are and what they are not.
2.Demonstrating what primitives,constructs,function and pointer are by explicitly running examples under debugging support.
3.Explicitly showing compiling and linking activities.
4.Running a simple quiz about what primitives,constructs and advance features are and are not.
5.Ending with a demonstration of some acquired debugging skills.
a. For instance, presenting program with flaws to be pinpointed and fixed individually by students, while explaining the reasons.
Compared to high-l evel languages,such as Pascal,Ada,BASIC,Python,Ruby or SQL as well as to low-level language as assembly,C/C++ is usually classified as middle-level computer language as it simultaneously leverages the best elements of high-level languages(e.g.,richer data types,better portability,better support for software reuse,and natural structure for expressing control fl ow)and the control and fl exibility of assembly language(e.g.,manipulation of bits,bytes,words,and point-ers).Although providing quite similar control and fl exibility of C/C++ regarding the manipulation of bits,bytes and words,Java and C# are also classifi ed as middle-level languages but they do not enable bare-metal manipulations(e.g.,pointer manipu-lation is dynamically managed by garbage collectors on both of them under no pro-grammer control).Such hybridity and its consequently lower abstraction have been promoted C/C++ as the chosen language for the development of system software such as compiler,linker,operating system or hypervisor,where operations on bits,bytes and addresses are very common.C++ language was approached as an extension of C,leveraging more abstract concepts than C.