ITP107 Engineering Programming I

Since modern computers have been developed and widely used, computer programming becomes a MUST-HAVE skill in the state-of-the-art research in every area. In this course, students learn basic grammar and logic that are necessary to communicate with computers and to make an order. C++ will be used as the programming language throughout the course, since it is one of the most widely used programming language today. C++ is the language of choice in many large-scale software projects such as operating systems, web browsers, and video games. This course aims to introduce the basic concepts of C++ programming. The target audience of this course is the beginners who have no prior programming experience. We will learn

  • Variables and expressions
  • Decision and looping
  • Function and recursion
  • Array and pointer
  • Introduction to Class and Object

pointerPerhaps, one of the most difficult concepts to the new learner is the pointer, which is a very powerful tool to access memory location and stored value, directly and indirectly. It should be noticed that a variable is “human-readable nickname” of memory location (i.e., vals[0] in the figure), whose real name (called by the machine) is a number (i.e., 0x4a00) denoted by an address. The pointer variable is the memory location that can store the real name of a memory location. (Since it is a variable, it also has a human-readable nickname, e.g., “valptr”, and an address that is not shown in the figure.) Now let the pointer stores the address (real name) of the original variable. If we follow the address stored in the pointer, you can reach to the value of the original variable, which is called “dereferencing”.